From 4b40e7daa1f4239c37ccb2b39bb475ce7c4f0e63 Mon Sep 17 00:00:00 2001 From: sawyer bristol Date: Sat, 14 Sep 2024 17:47:14 -0600 Subject: [PATCH] fix auth fix port --- docker/compose.yml | 4 ++++ docker/traefik/dynamic.toml | 20 +++++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/docker/compose.yml b/docker/compose.yml index ad98bba..9f78fa2 100644 --- a/docker/compose.yml +++ b/docker/compose.yml @@ -216,6 +216,10 @@ services: image: traefik container_name: traefik restart: always + environment: + - CF_API_KEY=${CF_API_KEY} + - CF_API_EMAIL=${CF_API_EMAIL} + - DNS=${DNS} volumes: - /etc/localtime:/etc/localtime:ro - /var/run/docker.sock:/var/run/docker.sock:ro diff --git a/docker/traefik/dynamic.toml b/docker/traefik/dynamic.toml index 3c29ea1..4b43001 100644 --- a/docker/traefik/dynamic.toml +++ b/docker/traefik/dynamic.toml @@ -1,3 +1,10 @@ +[http.routers.traefik] +middlewares = ["auth"] +service = "api@internal" +rule = "Host(`traefik.sawyer.services`)" +[http.routers.traefik.tls] +certResolver = "cloudflare" + [http.middlewares] [http.middlewares.auth.forwardAuth] address = "http://traefik-auth:4181" @@ -6,13 +13,16 @@ authResponseHeaders = ["X-Forwarded-User"] [http.middlewares.auth.forwardAuth.tls] insecureSkipVerify = true -[http.routers.traefik] -middlewares = ["auth"] -service = "api@internal" -rule = "Host(`traefik.sawyer.services`)" -[http.routers.traefik.tls] +[http.routers.auth] +service = "auth" +rule = "Host(`auth.sawyer.services`)" +[http.routers.auth.tls] certResolver = "cloudflare" +[http.services.auth.loadBalancer] +[[http.services.auth.loadBalancer.servers]] +url = "http://traefik-auth:4181" + [http.routers.komodo] middlewares = ["auth"] service = "komodo"