version: "3.8" networks: default: name: ${TRAEFIK_NETWORK_NAME:-traefik} services: nextcloud-web: environment: TRUSTED_PROXIES: ${TRAEFIK_NETWORK_NAME:-traefik} labels: - traefik.enable=true - traefik.docker.network=${TRAEFIK_NETWORK_NAME:-traefik} - traefik.http.routers.${TRAEFIK_ROUTER_NAME:-nextcloud}.rule=Host(`${NEXTCLOUD_DOMAIN:?err}`) - traefik.http.routers.${TRAEFIK_ROUTER_NAME:-nextcloud}.entrypoints=${TRAEFIK_ENTRYPOINTS:-web} - traefik.http.routers.${TRAEFIK_ROUTER_NAME:-nextcloud}.middlewares=nextcloud_redirect - traefik.http.middlewares.nextcloud_redirect.redirectregex.regex=/.well-known/(card|cal)dav - traefik.http.middlewares.nextcloud_redirect.redirectregex.replacement=/remote.php/dav/