From 0bb2355fa43903f335691a1be4bc6d09cd123be9 Mon Sep 17 00:00:00 2001 From: Firef4rt <64369103+Firef4rt@users.noreply.github.com> Date: Wed, 3 Jan 2024 12:51:54 +0100 Subject: [PATCH] Update docker-compose.yml Add to config a .home and wildcard cert with *.home. to seperate the the internal exposed services and the external in a easy way. --- Traefik/docker-compose.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Traefik/docker-compose.yml b/Traefik/docker-compose.yml index 1820c14..d889408 100644 --- a/Traefik/docker-compose.yml +++ b/Traefik/docker-compose.yml @@ -26,18 +26,20 @@ services: labels: - "traefik.enable=true" - "traefik.http.routers.traefik.entrypoints=http" - - "traefik.http.routers.traefik.rule=Host(`traefik-dashboard.yourdomain.co.uk`)" + - "traefik.http.routers.traefik.rule=Host(`traefik-dashboard.yourdomain.co.uk`)" # if you want a internal domain, get the wildcard cert for it and then choos traefik-dashboard.home.yourdomain.co.uk or what you want - "traefik.http.middlewares.traefik-auth.basicauth.users=YOUR_USERNAME_PASSWORD" - "traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https" - "traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https" - "traefik.http.routers.traefik.middlewares=traefik-https-redirect" - "traefik.http.routers.traefik-secure.entrypoints=https" - - "traefik.http.routers.traefik-secure.rule=Host(`traefik-dashboard.yourdomain.co.uk`)" + - "traefik.http.routers.traefik-secure.rule=Host(`traefik-dashboard.yourdomain.co.uk`)" # if you want a internal domain, get the wildcard cert for it and then choos traefik-dashboard.home.yourdomain.co.uk or what you want - "traefik.http.routers.traefik-secure.middlewares=traefik-auth" - "traefik.http.routers.traefik-secure.tls=true" - "traefik.http.routers.traefik-secure.tls.certresolver=cloudflare" - - "traefik.http.routers.traefik-secure.tls.domains[0].main=yourdomain.co.uk" - - "traefik.http.routers.traefik-secure.tls.domains[0].sans=*.yourdomain.co.uk" + #- "traefik.http.routers.traefik-secure.tls.domains[0].main=home.yourdomain.co.uk" # If you want *.home.yourdomain.co.uk subdomain or something else, you have to get the certifcates at first. + #- "traefik.http.routers.traefik-secure.tls.domains[0].sans=*.home.yourdomain.co.uk" # get a wildcard certificat for your .home.yourdomain.co.uk + - "traefik.http.routers.traefik-secure.tls.domains[0].main=yourdomain.co.uk" #if you use the .home.yourdomain.co.uk entry you have to change the [0] into [1] + - "traefik.http.routers.traefik-secure.tls.domains[0].sans=*.yourdomain.co.uk" # same here, change 0 to 1 - "traefik.http.routers.traefik-secure.service=api@internal"