refactor: replace traefik with caddy

This commit is contained in:
Stavros
2026-07-16 19:38:19 +03:00
parent 9f9a87eaac
commit bb1aa72754
3 changed files with 33 additions and 40 deletions
+15
View File
@@ -0,0 +1,15 @@
{
auto_https off
}
http://whoami.127.0.0.1.sslip.io {
forward_auth tinyauth:3000 {
uri /api/auth/caddy
copy_headers Remote-User Remote-Name Remote-Email Remote-Groups
}
reverse_proxy whoami:80
}
http://tinyauth.127.0.0.1.sslip.io {
reverse_proxy tinyauth:3000
}
+4 -17
View File
@@ -1,24 +1,15 @@
services:
traefik:
image: traefik:v3.7.8
caddy:
image: caddy:2.11.4
pull_policy: missing
command: |
--api.insecure=true
--providers.docker
--entrypoints.web.address=:80
--log.level=INFO
ports:
- 80:80
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./conf:/etc/caddy
whoami:
image: traefik/whoami:v1.11.0
pull_policy: missing
labels:
traefik.enable: true
traefik.http.routers.whoami.rule: Host(`whoami.127.0.0.1.sslip.io`)
traefik.http.routers.whoami.middlewares: tinyauth
tinyauth:
build:
@@ -30,8 +21,4 @@ services:
- LDFLAGS=-s -w
command: ["--configfile", "/app/config.yaml"]
volumes:
- ./config.e2e.yaml:/app/config.yaml:ro
labels:
traefik.enable: true
traefik.http.routers.tinyauth.rule: Host(`tinyauth.127.0.0.1.sslip.io`)
traefik.http.middlewares.tinyauth.forwardauth.address: http://tinyauth:3000/api/auth/traefik
- ./config.e2e.yaml:/app/config.yaml:ro