From bd5397fdda8482c0abf28f234082ab1791f710de Mon Sep 17 00:00:00 2001 From: gzfrozen <39619255+gzfrozen@users.noreply.github.com> Date: Fri, 22 Sep 2023 22:56:43 +0900 Subject: [PATCH] Update traefik v2 example. --- Proxy-examples.md | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/Proxy-examples.md b/Proxy-examples.md index fb01d90..0ccb23b 100644 --- a/Proxy-examples.md +++ b/Proxy-examples.md @@ -625,19 +625,16 @@ labels:
-Traefik v2 (docker-compose example by hwwilliams)
+Traefik v2 - v1.29.0+ (docker-compose example by hwwilliams, gzfrozen)
#### Traefik v1 labels migrated to Traefik v2 ```yaml labels: - traefik.enable=true - traefik.docker.network=traefik - - traefik.http.routers.bitwarden-ui.rule=Host(`bitwarden.domain.tld`) - - traefik.http.routers.bitwarden-ui.service=bitwarden-ui - - traefik.http.services.bitwarden-ui.loadbalancer.server.port=80 - - traefik.http.routers.bitwarden-websocket.rule=Host(`bitwarden.domain.tld`) && Path(`/notifications/hub`) - - traefik.http.routers.bitwarden-websocket.service=bitwarden-websocket - - traefik.http.services.bitwarden-websocket.loadbalancer.server.port=3012 + - traefik.http.routers.bitwarden.rule=Host(`bitwarden.domain.tld`) + - traefik.http.routers.bitwarden.service=bitwarden + - traefik.http.services.bitwarden.loadbalancer.server.port=80 ``` #### Migrated labels plus HTTP to HTTPS redirect @@ -650,24 +647,15 @@ labels: - traefik.docker.network=traefik - traefik.http.middlewares.redirect-https.redirectScheme.scheme=https - traefik.http.middlewares.redirect-https.redirectScheme.permanent=true - - traefik.http.routers.bitwarden-ui-https.rule=Host(`bitwarden.domain.tld`) - - traefik.http.routers.bitwarden-ui-https.entrypoints=websecure - - traefik.http.routers.bitwarden-ui-https.tls=true - - traefik.http.routers.bitwarden-ui-https.service=bitwarden-ui - - traefik.http.routers.bitwarden-ui-http.rule=Host(`bitwarden.domain.tld`) - - traefik.http.routers.bitwarden-ui-http.entrypoints=web - - traefik.http.routers.bitwarden-ui-http.middlewares=redirect-https - - traefik.http.routers.bitwarden-ui-http.service=bitwarden-ui - - traefik.http.services.bitwarden-ui.loadbalancer.server.port=80 - - traefik.http.routers.bitwarden-websocket-https.rule=Host(`bitwarden.domain.tld`) && Path(`/notifications/hub`) - - traefik.http.routers.bitwarden-websocket-https.entrypoints=websecure - - traefik.http.routers.bitwarden-websocket-https.tls=true - - traefik.http.routers.bitwarden-websocket-https.service=bitwarden-websocket - - traefik.http.routers.bitwarden-websocket-http.rule=Host(`bitwarden.domain.tld`) && Path(`/notifications/hub`) - - traefik.http.routers.bitwarden-websocket-http.entrypoints=web - - traefik.http.routers.bitwarden-websocket-http.middlewares=redirect-https - - traefik.http.routers.bitwarden-websocket-http.service=bitwarden-websocket - - traefik.http.services.bitwarden-websocket.loadbalancer.server.port=3012 + - traefik.http.routers.bitwarden-https.rule=Host(`bitwarden.domain.tld`) + - traefik.http.routers.bitwarden-https.entrypoints=websecure + - traefik.http.routers.bitwarden-https.tls=true + - traefik.http.routers.bitwarden-https.service=bitwarden + - traefik.http.routers.bitwarden-http.rule=Host(`bitwarden.domain.tld`) + - traefik.http.routers.bitwarden-http.entrypoints=web + - traefik.http.routers.bitwarden-http.middlewares=redirect-https + - traefik.http.routers.bitwarden-http.service=bitwarden + - traefik.http.services.bitwarden.loadbalancer.server.port=80 ```