From 6a5f9fb8ebb8b9911ab863eb086657b62546a062 Mon Sep 17 00:00:00 2001 From: Bryan Joshua Pedini Date: Tue, 16 Aug 2022 16:04:55 +0200 Subject: [PATCH] =?UTF-8?q?reordered=20Tr=C3=A6fik=20labels?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8d14c8c..e00207c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,6 +14,10 @@ services: labels: - traefik.enable=${TRAEFIK_ENABLED} - traefik.docker.network=${TRAEFIK_NETWORK} + # specify a custom middleware for nextcloud-specific configuration + - traefik.http.middlewares.nextcloud-redirectregex.redirectRegex.permanent=true + - traefik.http.middlewares.nextcloud-redirectregex.redirectRegex.regex="https://(.*)/.well-known/(card|cal)dav" + - traefik.http.middlewares.nextcloud-redirectregex.redirectRegex.replacement="https://$${1}/remote.php/dav/" ### Section HTTP - traefik.http.routers.http-${TRAEFIK_ROUTER}.entrypoints=http # redirect to HTTPS only @@ -22,17 +26,13 @@ services: ### Section HTTPS - traefik.http.routers.https-${TRAEFIK_ROUTER}.entrypoints=https # configure the exposed service + - traefik.http.routers.https-${TRAEFIK_ROUTER}.middlewares=nextcloud-redirectregex - traefik.http.routers.https-${TRAEFIK_ROUTER}.rule=Host(`${TRAEFIK_MATCHRULE}`) # of course, enable TLS and it's certificate provider - traefik.http.routers.https-${TRAEFIK_ROUTER}.tls=${TRAEFIK_TLSENABLED} - traefik.http.routers.https-${TRAEFIK_ROUTER}.tls.certresolver=${TRAEFIK_CERTRESOLVER} # specify a service so a custom port can be used - traefik.http.services.${TRAEFIK_SERVICE}.loadbalancer.server.port=${TRAEFIK_SERVICE_PORT} - # specify a custom middleware for nextcloud-specific configuration - - traefik.http.middlewares.nextcloud-redirectregex.redirectRegex.permanent=true - - traefik.http.middlewares.nextcloud-redirectregex.redirectRegex.regex="https://(.*)/.well-known/(card|cal)dav" - - traefik.http.middlewares.nextcloud-redirectregex.redirectRegex.replacement="https://$${1}/remote.php/dav/" - - traefik.http.routers.https-${TRAEFIK_ROUTER}.middlewares=nextcloud-redirectregex networks: - internal - traefik