version: '3.3' services: ######## Datenbank ######## nextcloud-db: image: mariadb:10 container_name: nextcloud-db command: --transaction-isolation=READ-COMMITTED --log-bin=ROW --innodb_read_only_compressed=OFF restart: unless-stopped volumes: - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro - db:/var/lib/mysql environment: MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} MYSQL_PASSWORD: ${MYSQL_PASSWORD} MYSQL_DATABASE: nextcloud MYSQL_USER: nextcloud MYSQL_INITDB_SKIP_TZINFO: 1 networks: - intern labels: - com.centurylinklabs.watchtower.enable=true ######## Redis ######## nextcloud-redis: image: redis:7-alpine container_name: nextcloud-redis hostname: nextcloud-redis networks: - intern restart: unless-stopped command: redis-server --requirepass ${REDIS_HOST_PASSWORD} labels: - com.centurylinklabs.watchtower.enable=true ######## cron ######## cron: container_name: nextcloud-cron image: rcdailey/nextcloud-cronjob:latest restart: unless-stopped network_mode: none depends_on: - nextcloud-app volumes: - /var/run/docker.sock:/var/run/docker.sock:ro - /etc/localtime:/etc/localtime:ro environment: NEXTCLOUD_CONTAINER_NAME: nextcloud-app NEXTCLOUD_CRON_MINUTE_INTERVAL: 1 labels: - com.centurylinklabs.watchtower.enable=true ######## Nextcloud ######## nextcloud-app: image: nextcloud:${NC_MAJOR_VERSION} container_name: nextcloud-app restart: unless-stopped depends_on: - nextcloud-db - nextcloud-redis environment: REDIS_HOST: nextcloud-redis REDIS_HOST_PASSWORD: ${REDIS_HOST_PASSWORD} MYSQL_DATABASE: nextcloud MYSQL_USER: nextcloud MYSQL_PASSWORD: ${MYSQL_PASSWORD} MYSQL_HOST: nextcloud-db NEXTCLOUD_TRUSTED_DOMAINS: "nextcloud.mgrote.net" SMTP_HOST: smtp.strato.de SMTP_SECURE: tls SMTP_PORT: 587 SMTP_AUTHTYPE: LOGIN SMTP_NAME: info@mgrote.net SMTP_PASSWORD: ${SMTP_PASSWORD} MAIL_FROM_ADDRESS: info@mgrote.net PHP_MEMORY_LIMIT: 1024M PHP_UPLOAD_LIMIT: 10G APACHE_DISABLE_REWRITE_IP: 1 TRUSTED_PROXIES: "192.168.2.43" # docker10.grote.lan/traefik volumes: - app:/var/www/html - data:/var/www/html/data networks: - intern # ports: # - 80:80 networks: - intern - traefik labels: - com.centurylinklabs.watchtower.enable=true - com.centurylinklabs.watchtower.depends-on=nextcloud-redis,nextcloud-db - traefik.http.routers.nextcloud.rule=Host(`nextcloud.mgrote.net`) - traefik.enable=true - traefik.http.routers.nextcloud.tls=true - traefik.http.routers.nextcloud.tls.certresolver=resolver_letsencrypt - traefik.http.routers.nextcloud.entrypoints=entry_https - traefik.http.services.nextcloud.loadbalancer.server.port=80 - traefik.http.middlewares.nextcloud-webdav.replacepathregex.regex="^/.well-known/ca(l|rd)dav" - traefik.http.middlewares.nextcloud-webdav.replacepathregex.replacement="/remote.php/dav/" - traefik.http.middlewares.nextcloud-hsts.headers.stsincludesubdomains=false - traefik.http.middlewares.nextcloud-hsts.headers.stspreload=true - traefik.http.middlewares.nextcloud-hsts.headers.stsseconds=15552001 - traefik.http.middlewares.nextcloud-hsts.headers.isdevelopment=false - traefik.http.routers.nextcloud.middlewares=nextcloud-hsts@docker,nextcloud-webdav@docker ######## Networks ######## networks: intern: driver: bridge traefik: external: true ######## Volumes ######## volumes: db: app: data: ######## Doku ######## # Telefonregion # docker exec --user www-data nextcloud-app php occ config:system:set default_phone_region --value="DE"