version: '3.3' services: dbnc: restart: always image: postgres:11 container_name: nextcloud_db networks: - other environment: - POSTGRES_USER=NOMBRE_USUARIO - POSTGRES_PASSWORD=${POSTGRES_PW} - POSTGRES_DB=NOMBRE_BD volumes: - ./nextcloud-db:/var/lib/postgresql/data redis: image: redis:latest container_name: nextcloud_redis restart: always command: redis-server --requirepass ${REDIS_PW} networks: - other # - proxy volumes: - ./redis:/var/lib/redis nextcloud: image: nextcloud:latest container_name: nextcloud restart: always hostname: nextcloud.${DOMAIN} networks: - other - proxy depends_on: - redis - dbnc labels: - "traefik.enable=true" - "traefik.docker.network=proxy" - "traefik.http.routers.nextcloud.entrypoints=websecure" - "traefik.http.routers.nextcloud.middlewares=nextcloud,nextcloud_redirect" - "traefik.http.routers.me.tls.certresolver=mytlschallenge" - "traefik.http.routers.nextcloud.rule=Host(`nextcloud.${DOMAIN}`)" # - "traefik.http.middlewares.nextcloud.headers.customFrameOptionsValue=ALLOW-FROM https://${DOMAIN}" # - "traefik.http.middlewares.nextcloud.headers.contentSecurityPolicy=frame-ancestors 'self' ${DOMAIN} *.${DOMAIN}" # - "traefik.http.middlewares.testHeader.headers.customrequestheaders.X-Frame-Options=SAMEORIGIN" - "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_redirect.redirectregex.regex=/.well-known/(card|cal)dav" - "traefik.http.middlewares.nextcloud_redirect.redirectregex.replacement=/remote.php/dav/" environment: - POSTGRES_DB=NOMBRE_BD - POSTGRES_USER=NOMBRE_USUARIO - POSTGRES_PASSWORD=${POSTGRES_PW} - POSTGRES_HOST=dbnc - NEXTCLOUD_ADMIN_USER=NOMBRE_USUARIO_APP - NEXTCLOUD_ADMIN_PASSWORD=${NEXTCLOUD_PW} - REDIS_HOST=redis - REDIS_HOST_PASSWORD=${REDIS_PW} - NEXTCLOUD_TRUSTED_DOMAINS=nextcloud.${DOMAIN} # - TRUSTED_PROXIES=172.18.0.0/16 - OVERWRITEPROTOCOL=https volumes: - ./nextcloud-www:/var/www/html networks: proxy: external: true other: