fix(web): Caddyfile ins Image backen — SPA statt Caddy-Default-Seite
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>
This commit is contained in:
1 parent
3b928d0ad0
commit
67e8916634
2 files changed
+13
-1
No files matched your search
@@ -0,0 +1,10 @@
|
||||
# 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
|
||||
}
|
||||
+3
-1
@@ -19,6 +19,8 @@ COPY packages/shared ./packages/shared
|
||||
|
||||
RUN pnpm --filter web build
|
||||
|
||||
# --- runtime (static via Caddy in production compose) ---
|
||||
# --- runtime (static via Caddy) ---
|
||||
FROM caddy:2-alpine AS runtime
|
||||
# Eigene Caddy-Config statt der Default-Welcome-Seite: SPA aus /srv ausliefern.
|
||||
COPY apps/web/Caddyfile /etc/caddy/Caddyfile
|
||||
COPY --from=builder /repo/apps/web/dist /srv
|
||||
Reference in new issue
Block a user