version: '3' networks: web: external: true internal: external: false services: db: image: mariadb networks: - internal labels: - traefik.enable=false restart: always command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW volumes: - /dws/systemdata/nextclouddb:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=${MSQLROOTPASS} - MYSQL_PASSWORD=${MSQLPASS} - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud app: image: nextcloud restart: always labels: - traefik.http.routers.nextcloud.middlewares=nextcloud,nextcloud_redirect - traefik.http.routers.nextcloud.tls=true - traefik.http.routers.nextcloud.tls.certresolver=lets-encrypt - traefik.http.routers.nextcloud.rule=Host(`cloud.dws.rip`) - traefik.http.middlewares.nextcloud.headers.customFrameOptionsValue=ALLOW-FROM https://dws.rip - traefik.http.middlewares.nextcloud.headers.contentSecurityPolicy=frame-ancestors 'self' dws.rip *.dws.rip - traefik.http.middlewares.nextcloud.headers.stsSeconds=155520011 - traefik.http.middlewares.nextcloud.headers.stsIncludeSubdomains=true - traefik.http.middlewares.nextcloud.headers.stsPreload=true - traefik.http.middlewares.nextcloud.headers.customresponseheaders.X-Frame-Options=SAMEORIGIN - traefik.http.middlewares.nextcloud_redirect.redirectregex.permanent=true - traefik.http.middlewares.nextcloud_redirect.redirectregex.regex=https://(.*)/.well-known/(card|cal)dav - traefik.http.middlewares.nextcloud_redirect.redirectregex.replacement=https://$${1}/remote.php/dav/ - traefik.port=8080 networks: - internal - web links: - db volumes: - /dws/data/:/var/www/html - /dws/otherdata/:/otherdata environment: - MYSQL_PASSWORD=${MSQLPASS} - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud - MYSQL_HOST=db - TRUSTED_PROXIES=172.22.0.4