This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
spadinastan/services/traefik/traefik_dynamic_local.toml
Marc Cataford 980aa2a8ba
feat: better auth service (#20)
* feat: forwardauth + oauth implementation

* build: ignore env dotfiles

* infra: local dynamic config, add service and forwardauth, remove unneeded port expose

* fix: routing on callback, extraneous COPY calls

* infra: auth service config

* chore: remove legacy monolith auth

* infra: ensure that auth container restarts always
2023-05-22 14:10:38 -04:00

53 lines
1.7 KiB
TOML

[http.routers]
[http.routers.api]
rule = "Host(`localhost`)"
entrypoints = ["web"]
middlewares = ["auth-service"]
service = "api@internal"
[http.routers.deluge]
rule = "Host(`localhost`) && PathPrefix(`/deluge/`)"
service = "deluge"
middlewares = ["deluge-base-headers", "monolith-auth", "deluge-stripprefix"]
[http.routers.monolith]
rule = "Host(`localhost`) && PathPrefix(`/app/`)"
service = "monolith"
[http.routers.bitwarden]
rule = "Host(`localhost`) && (PathPrefix(`/bitwarden/`) || HeadersRegexp(`Bitwarden-Client-Name`, `.*`))"
service = "bitwarden"
middlewares = ["bitwarden-stripprefix"]
[http.middlewares]
[http.middlewares.monolith-auth.forwardauth]
address = "http://monolith:8000/app/identity/me/"
[http.middlewares.auth-service.forwardauth]
address = "http://auth-service:8080/auth/login"
[http.middlewares.deluge-base-headers.headers.customRequestHeaders]
X-Deluge-Base = "/deluge/"
[http.middlewares.deluge-stripprefix.stripprefix]
prefixes = ["/deluge"]
[http.middlewares.bitwarden-stripprefix.stripprefix]
prefixes = ["/bitwarden"]
[http.services]
[http.services.authservice.loadBalancer]
[[http.services.authservice.loadBalancer.servers]]
url = "http://authservice:8080/"
[http.services.deluge.loadBalancer]
[[http.services.deluge.loadBalancer.servers]]
url = "http://deluge:8112/"
[http.services.monolith.loadBalancer]
[[http.services.monolith.loadBalancer.servers]]
url = "http://monolith:8000/"
[http.services.bitwarden.loadBalancer]
[[http.services.bitwarden.loadBalancer.servers]]
url = "http://bitwarden:8080/"