====== 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 [[.:serverbasics:docker|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:
- 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!)
- 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|https://github.com/nextcloud/all-in-one]] - check out this mind- blowing experience if your server is fast enough!
===== Docker and Root =====
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|https://obel1x.de/dokuwiki/doku.php?id=content:serverbasics:docker]] and come back later.
===== Vorwort =====
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." [[https://forums.opensuse.org/t/docker-not-running-on-startup-can-run-manually/166056/7|Link]]
===== Docker+Portainer zum Laufen bekommen =====
[[https://www.howtogeek.com/devops/how-to-get-started-with-portainer-a-web-ui-for-docker/|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
===== Nextcloud installieren =====
[[https://hub.docker.com/_/nextcloud|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|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