Created
October 5, 2022 09:57
-
-
Save PJaros/13626ce65ce096e8d514d136dce992ff to your computer and use it in GitHub Desktop.
hoellen/nextcloud docker-compose.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hoellen Nextcloud: https://hub.docker.com/r/hoellen/nextcloud | |
Auf Github: https://github.com/hoellen/docker-nextcloud | |
Let's Encrypt. DNS Einträge anlegen so wie hier beschrieben: https://github.com/evgeniy-khist/letsencrypt-docker-compose#step-0---create-dns-records | |
# Installation | |
Das File docker-compose.yml und proxy-default.conf anlegen. | |
Starten mit: docker-compose up -d | |
Zustand anzeigen: docker-compose ps | |
Nextcloud Logs: docker-compose logs -f nextcloud | |
# Nextcloud Befehle | |
## Status und Upgrade | |
docker-compose exec --user 991 nextcloud php -d memory_limit=512M /nextcloud/occ status | |
docker-compose exec --user 991 nextcloud php -d memory_limit=512M /nextcloud/occ upgrade | |
docker-compose exec --user 991 nextcloud php -d memory_limit=512M /nextcloud/occ maintenance:mode --off | |
## Apps anzeigen installieren usw | |
docker-compose exec --user 991 nextcloud php -d memory_limit=512M /nextcloud/occ app:list | |
docker-compose exec --user 991 nextcloud php -d memory_limit=512M /nextcloud/occ app:disable mail | |
docker-compose exec --user 991 nextcloud php -d memory_limit=512M /nextcloud/occ app:install <appname-hier> | |
## Benutzer zeigen, anlegen, löschen | |
Mindest Passwort-Länge steht in "Settings", "Verwaltung", "Sicherheit" | |
docker-compose exec --user 991 nextcloud php -d memory_limit=512M /nextcloud/occ user:list | |
docker-compose exec --user 991 nextcloud php -d memory_limit=512M /nextcloud/occ user:delete user | |
docker-compose exec --user 991 nextcloud php -d memory_limit=512M /nextcloud/occ user:add <name-hier> | |
# Shell im Nextcloud-Container öffnen | |
docker-compose exec --user 991 nextcloud sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
services: | |
nginx-proxy: | |
image: jwilder/nginx-proxy | |
restart: always | |
ports: ["80:80", "443:443"] | |
volumes: | |
- nginx_proxy_vhost.d:/etc/nginx/vhost.d | |
- nginx_proxy_html:/usr/share/nginx/html | |
- ./proxy-default.conf:/etc/nginx/conf.d/my-proxy.default.conf:ro | |
- ./le-cert:/etc/nginx/certs:ro | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
labels: | |
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true" | |
letsencrypt-nginx-proxy-companion: | |
image: jrcs/letsencrypt-nginx-proxy-companion | |
restart: always | |
container_name: le-proxy-companion | |
volumes: | |
- nginx_proxy_vhost.d:/etc/nginx/vhost.d | |
- nginx_proxy_html:/usr/share/nginx/html | |
- ./le-cert:/etc/nginx/certs:rw | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
nc-db: | |
image: mariadb:10 | |
hostname: nc-db | |
restart: unless-stopped | |
expose: [3306] | |
# ports: ["3306:3306"] # Kommentar-Zeichen enfernen, falls man mit einem DB-Tool direkt auf die DB zugreiffen möchte | |
volumes: | |
- ./nc-db:/var/lib/mysql | |
environment: | |
- MYSQL_ROOT_PASSWORD=supersecretpassword | |
- MYSQL_DATABASE=nextcloud | |
- MYSQL_USER=nextcloud | |
- MYSQL_PASSWORD=supersecretpassword | |
command: | |
- '--character-set-server=utf8mb4' | |
- '--collation-server=utf8mb4_general_ci' | |
- '--skip-innodb-read-only-compressed' | |
nextcloud: | |
image: hoellen/nextcloud:latest | |
restart: unless-stopped | |
depends_on: | |
- nginx-proxy | |
- nc-db | |
environment: | |
- UPLOAD_MAX_SIZE=10G | |
- APC_SHM_SIZE=128M | |
- OPCACHE_MEM_SIZE=128 | |
- CRON_PERIOD=15m | |
- TZ=Europe/Berlin | |
- DB_TYPE=mysql | |
- DB_NAME=nextcloud | |
- DB_USER=nextcloud | |
- DB_PASSWORD=supersecretpassword | |
- DB_HOST=nc-db | |
- CHECK_PERMISSIONS=0 | |
- VIRTUAL_HOST=nextcloud.example.com | |
- LETSENCRYPT_HOST=nextcloud.example.com | |
- LETSENCRYPT_EMAIL=<[email protected]> # Mail-Adresse verwenden unter welcher man erreichbar ist | |
volumes: | |
- ./nc-data:/data | |
- ./nc-config:/config | |
- ./nc-apps:/apps2 | |
- ./nc-themes:/nextcloud/themes | |
volumes: | |
nginx_proxy_vhost.d: | |
nginx_proxy_html: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server_tokens off; | |
client_max_body_size 500m; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment