Serve dist from stock caddy:2-alpine + mounted bundle (drop custom runtime image) #22
Labels
No labels
burndown-2026-06
coherence-core
consult
headless
interactive
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coilyco-flight-deck/galaxy-gen#22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Make galaxy-gen's runtime a literal, unmodified
caddy:2-alpinewith the build output mounted, instead of a custom runtime image with the assets baked in.Context
Dockerfilestage 2 is alreadyFROM caddy:2-alpine+COPY --from=builder /app/dist /usr/share/caddy. The custom image exists only because stage 1 is a real compile - Rust ->wasm-pack-> webpack, with the load-bearing binaryen-119 pin that dodges theWebAssembly.Table.grow()browser crash. That compile is intrinsic and stays in a build stage. Only the serving layer is being changed.Plan
FROM scratch+COPY --from=builder /app/dist /. CI pushes it to the in-cluster registry as192.168.0.194:30500/galaxy-gen-dist:<sha>. That image is the bundle - no base image, no server, nothing to run.caddy:2-alpinewith the bundle delivered via volume.Delivery path - two options
volumes[].image) - purest, exactly the "stock caddy + mounted bundle" shape, bundle stays pureFROM scratch. Needs theImageVolumefeature: GA/on-by-default on k8s 1.33+, but alpha/off on the current server (v1.32.3+k3s1). Using it now means enabling an alpha feature gate on the single control-plane node + a k3s restart.FROM busybox+COPY dist /dist, an initContainercp -r /dist/* /wwwinto a sharedemptyDir, stockcaddy:2-alpineserves/www. Works on 1.32 today, zero cluster change, one tiny extra container in the pod spec. Recommended now. Swap to the image-volume form for free once kai-server is on k3s 1.33+.Rejected
index.html) is possible but a pessimization: ~33% size inflation, losesinstantiateStreaming(decode-before-compile stall), loses separate wasm caching. Keepdist/as an immutable bundle (a directory), not one file.SENTRY_DSNstays baked at webpack build time (DefinePlugin) in the build stage - browser is the runtime, a k8s env var would be too late.Cross-link
Shares the stock-caddy + mounted-bundle deploy pattern with the
repos.coilysiren.mecatalog-graph viewer. Whichever delivery path lands here, that one follows.coilysiren referenced this issue2026-06-06 04:42:17 +00:00