From f137b8df9b89866cefdfd283ae0612f184ebc207 Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Tue, 26 May 2020 14:40:44 +0200 Subject: [PATCH] Add ssl config for local development. --- docker-compose.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 53103049..5f49548d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,15 +18,23 @@ services: labels: - "traefik.docker.network=reverse-proxy" - "traefik.enable=true" + ### ### + - "traefik.http.middlewares.nopaque.headers.customrequestheaders.X-Forwarded-Proto=http" - "traefik.http.routers.nopaque.entrypoints=web" - # Change the next line to match your nopaque domain. - - "traefik.http.routers.nopaque.rule=Host(`nopaque.localhost`)" - # The next two lines enable HTTPS. - # - "traefik.http.routers.nopaque.entrypoints=websecure" - # - "traefik.http.routers.nopaque.tls.certresolver=myresolver" - # The next two lines add Basic Authentication. More information: https://docs.traefik.io/middlewares/basicauth/ + - "traefik.http.routers.nopaque.middlewares=nopaque@docker" + - "traefik.http.routers.nopaque.rule=Host(`nopaque.localhost`)" # Change this to match your nopaque domain + ### ### + ### ### + - "traefik.http.middlewares.nopaquesecure.headers.customrequestheaders.X-Forwarded-Proto=https" + - "traefik.http.routers.nopaquesecure.entrypoints=websecure" + - "traefik.http.routers.nopaquesecure.middlewares=nopaquesecure@docker" + - "traefik.http.routers.nopaquesecure.rule=Host(`nopaque.localhost`)" # Change this to match your nopaque domain + - "traefik.http.routers.nopaquesecure.tls=true" + ### ### + ### ### # - "traefik.http.middlewares.nopaque.basicauth.users=name:hashed-password" - # - "traefik.http.routers.nopaque.middlewares=nopaque" + # - "traefik.http.middlewares.nopaquesecure.basicauth.users=name:hashed-password" + ### ### networks: - default - reverse-proxy