Das web-Runtime-Image (caddy:2-alpine) hatte keine eigene Config, daher
lieferte Caddy seine Default-Welcome-Seite aus /usr/share/caddy statt der
gebauten SPA aus /srv ("Caddy works!"). Eigene Caddyfile (root /srv,
try_files SPA-Fallback) wird jetzt nach /etc/caddy/Caddyfile kopiert.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
11 lines
352 B
Caddyfile
11 lines
352 B
Caddyfile
# Caddy-Config für das statische Web-Image (cockpit-web).
|
|
# Liefert die gebaute SPA aus /srv mit SPA-Fallback auf index.html.
|
|
# /api und /trpc werden in Produktion bereits von Traefik (höhere Priorität)
|
|
# an cockpit-api geroutet und erreichen diesen Container nicht.
|
|
:80 {
|
|
root * /srv
|
|
encode zstd gzip
|
|
try_files {path} /index.html
|
|
file_server
|
|
}
|