From 817f1cbcc2067e857b3002e687172756a6bfef49 Mon Sep 17 00:00:00 2001 From: Hermes Date: Wed, 20 May 2026 14:04:05 -0400 Subject: [PATCH] feat(hermes): add Traefik routing + Authelia auth for dashboard --- ai/compose.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/ai/compose.yml b/ai/compose.yml index 446d2f5..6f5a772 100644 --- a/ai/compose.yml +++ b/ai/compose.yml @@ -70,6 +70,30 @@ services: - "26" networks: - ai_backend + - ai_net + labels: + - "traefik.enable=true" + - "traefik.docker.network=ai_net" + + # Router for HTTP + redirect to HTTPS + - "traefik.http.routers.hermes-web-http.rule=Host(`hermes.lazyworkhorse.net`)" + - "traefik.http.routers.hermes-web-http.entrypoints=web" + - "traefik.http.routers.hermes-web-http.middlewares=redirect-to-https" + + # Router for HTTPS with TLS — protected by Authelia + - "traefik.http.routers.hermes-web-https.rule=Host(`hermes.lazyworkhorse.net`)" + - "traefik.http.routers.hermes-web-https.entrypoints=websecure" + - "traefik.http.routers.hermes-web-https.tls=true" + - "traefik.http.routers.hermes-web-https.tls.certresolver=njalla" + - "traefik.http.routers.hermes-web-https.middlewares=hermes-auth" + + # Authelia forwardAuth + - "traefik.http.middlewares.hermes-auth.forwardauth.address=http://authelia:9091/api/verify?rd=https://auth.lazyworkhorse.net/" + - "traefik.http.middlewares.hermes-auth.forwardauth.trustforwardheader=true" + - "traefik.http.middlewares.hermes-auth.forwardauth.authresponseheaders=X-Forwarded-User,X-Forwarded-Groups" + + # Service Loadbalancer (dashboard port 9119) + - "traefik.http.services.hermes-web.loadbalancer.server.port=9119" healthcheck: test: ["CMD-SHELL", "curl -fsS http://localhost:8642/health && curl -fsS http://localhost:9119/api/status || exit 1"] interval: 15s