Skip to content

Commit

Permalink
fix auth
Browse files Browse the repository at this point in the history
fix port
  • Loading branch information
LegitCamper committed Sep 14, 2024
1 parent 8ac7725 commit 4b40e7d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
4 changes: 4 additions & 0 deletions docker/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 15 additions & 5 deletions docker/traefik/dynamic.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit 4b40e7d

Please sign in to comment.