Files
home-docker/home-apps/demo-service-caddy.yaml
T
Junv (via Hermes) 492ed0c3e5 fix(demo-service): move Caddyfile to dedicated ConfigMap manifest
- Extract Caddyfile from demo-service.yaml into demo-service-caddy.yaml
- ArgoCD auto-applies both files; Caddyfile changes are tracked in git
- Fixes issue where Caddyfile updates in the source dir weren't reaching the pod
2026-06-14 12:25:48 +10:00

61 lines
1.7 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: demo-caddy-config
namespace: home-apps
data:
Caddyfile: |
# Caddy for Demo Service — internal server, TLS handled by Nginx Ingress
:80 {
log {
output stdout
format json
}
# ── Custom error pages (canvas animation, served directly by Caddy) ──
handle_errors {
@html_errors expression `{err.status_code} in [401, 403, 404]`
handle @html_errors {
root * /app/static
rewrite * /error-page.html
file_server
}
}
# Management API → Python service
handle /api/* {
reverse_proxy localhost:3000 {
header_up Host {host}
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto https
}
}
# Admin Web UI → Python service
handle /admin {
reverse_proxy localhost:3000
}
handle /admin/* {
reverse_proxy localhost:3000
}
# ── Site content: API handles visibility + auth ──
# Public sites served without auth; drafts require login
handle {
rewrite * /site-content{uri}
reverse_proxy localhost:3000 {
header_up Host {host}
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto https
header_up Cookie {http.request.header.Cookie}
}
}
header {
X-Content-Type-Options nosniff
X-Frame-Options SAMEORIGIN
-Server
}
}