meldestelle/config/docker/caddy/web-app/Caddyfile
Stefan Mogeritsch 9747b9957f
All checks were successful
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Successful in 7m0s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Successful in 7m1s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Successful in 2m0s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Successful in 1m50s
fix(web-app): Caddy templates für text/html + SW-Bypass für config.json
Co-authored-by: Junie <junie@jetbrains.com>
2026-03-14 13:23:28 +01:00

44 lines
949 B
Caddyfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
# TLS wird durch Pangolin/Traefik auf dem VPS terminiert hier kein HTTPS nötig
auto_https off
servers {
metrics
}
}
:4000 {
# Root-Verzeichnis für statische Assets
root * /usr/share/caddy
# Logging (strukturiert, JSON)
log {
output stdout
format json
}
# Komprimierung
encode gzip zstd
# Caddy-Template-Engine: ersetzt {{.Env.VAR}} in index.html UND config.json
templates {
mime text/html application/json
}
# API-Proxy (höchste Priorität vor dem SPA-Fallback)
handle /api/* {
reverse_proxy api-gateway:8081
}
# Health-Check-Endpunkt (für Pangolin Health-Check konfigurieren: GET /health)
handle /health {
respond "healthy" 200
}
# SPA-Fallback: existierende Dateien direkt ausliefern, sonst index.html
handle {
try_files {path} /index.html
file_server
}
}