Diese Version (2023/12/21 07:35) wurde bestätigt durch Daniel.Die zuvor bestätigte Version (2023/10/01 10:35) ist verfügbar.Diff

Nextcloud installieren mit Docker ohne Services

DEPRECATED - Only Tec-Knowledge - better don't user portainer ymls, don't use docker in root, don't create volumes like this, read https://obel1x.de/dokuwiki/doku.php?id=content:serverbasics:docker| before!

Note for english speakers: this is german as by time of writing i decided to do so. It's a working draft with hints but don't expect a full howto guide. Maybe i will write a new one including full flagged Server- Setup. Util then, this is all you will find here.

BTW: Two things to consider before reading this:

  1. Portainer does have an own yaml- editor integrated in Stack -Management, which is quite nice to use and makes it easier to start and stop services in larger setups. So don't creat yaml- files on your own, but put the contents in a new stack in the editor there (and make a backup of you portainer- volume!)
  2. Nextcloud itself is very powerfull, but gets even really explosive using all of its features! The NC- Devs make it easy to install all of them in one step using https://github.com/nextcloud/all-in-one - check out this mind- blowing experience if your server is fast enough!

There is a big Problem with docker: The Daemon is running as root and also the Container- Services are. I am not a fried of this - so maybe you want to install Docker as non-root- user as wriztten here https://obel1x.de/dokuwiki/doku.php?id=content:serverbasics:docker and come back later.

Dies ist ein einfaches Setup. Nach der Installation von docker, kann folgendes gemacht werden.

Achtung: Docker.service und Containerd.service zusammen funktionieren NICHT ! Sollte Docker einfach nicht starten:

„Yes, that was the problem. Ran systemctl disable containerd then rebooted and docker started as it should.“ Link

https://www.howtogeek.com/devops/how-to-get-started-with-portainer-a-web-ui-for-docker/
docker volume create portainer_data
docker run -d -p 81:9000 –name=portainer –restart=unless-stopped -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce

https://hub.docker.com/_/nextcloud
Ordner anlegen /opt/docker/nextcloud

https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf
herunterladen, abspeichern

docker-compose-yaml anlegen:

version: '2'

volumes:
  nextcloud:
  db:

services:
  db:
    image: mariadb:10.6
    restart: always
    command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
    volumes:
      - db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=D@xDarunt€rD@h3rG3p1@nt3n
      - MYSQL_PASSWORD=L3g7J€we1ligenR€@g1ert€ltern
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

  app:
    image: nextcloud:fpm
    restart: always
    links:
      - db
    volumes:
      - nextcloud:/var/www/html
    environment:
      - MYSQL_PASSWORD=L3g7J€we1ligenR€@g1ert€ltern
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=db

  web:
    image: nginx
    restart: always
    ports:
      - 8080:80
    links:
      - app
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
    volumes_from:
      - app

Start mit

docker-compose up -d
Diese Website verwendet Cookies. Durch die Nutzung der Website stimmen Sie dem Speichern von Cookies auf Ihrem Computer zu. Außerdem bestätigen Sie, dass Sie unsere Datenschutzbestimmungen gelesen und verstanden haben. Wenn Sie nicht einverstanden sind, verlassen Sie die Website.Weitere Information
  • content/docker_nextcloud_phpfpm.txt
  • Zuletzt geändert: 2023/12/21 07:35
  • von Daniel