From d2a2fac03fe9a720287657a5d7782f437ad0138b Mon Sep 17 00:00:00 2001 From: Simon C Date: Thu, 9 Apr 2020 11:11:36 +0200 Subject: [PATCH] feat: Simplify traefik rules --- docker-compose.yml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e5b29f2..2a344f4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -46,25 +46,15 @@ services: labels: traefik.enable: "true" - # Redirect http:// to https:// traefik.http.routers.histoiredunpied.rule: "Host(`${URL}`)" - traefik.http.routers.histoiredunpied.entrypoints: "web" - traefik.http.routers.histoiredunpied.middlewares: "redirect-https@docker" - - traefik.http.routers.histoiredunpied-https.rule: "Host(`${URL}`)" - traefik.http.routers.histoiredunpied-https.entrypoints: "websecure" - traefik.http.routers.histoiredunpied-https.tls.certResolver: "letsencrypt" - - # Redirect http://www to https:// - traefik.http.routers.histoiredunpied-redirect-www.rule: "Host(`www.${URL}`)" - traefik.http.routers.histoiredunpied-redirect-www.entrypoints: "web" - traefik.http.routers.histoiredunpied-redirect-www.middlewares: "redirect-www@docker" + traefik.http.routers.histoiredunpied.entrypoints: "websecure" + traefik.http.routers.histoiredunpied.tls.certResolver: "letsencrypt" # Redirect https://www to https:// - traefik.http.routers.histoiredunpied-redirect-www-https.rule: "Host(`www.${URL}`)" - traefik.http.routers.histoiredunpied-redirect-www-https.entrypoints: "websecure" - traefik.http.routers.histoiredunpied-redirect-www-https.tls.certResolver: "letsencrypt" - traefik.http.routers.histoiredunpied-redirect-www-https.middlewares: "redirect-www@docker" + traefik.http.routers.histoiredunpied-redirect-www.rule: "Host(`www.${URL}`)" + traefik.http.routers.histoiredunpied-redirect-www.entrypoints: "websecure" + traefik.http.routers.histoiredunpied-redirect-www.tls.certResolver: "letsencrypt" + traefik.http.routers.histoiredunpied-redirect-www.middlewares: "redirect-www@docker" com.centurylinklabs.watchtower.enable: true networks: