feat: implement go:embed for templates and static assets to fix distroless container paths #231
Reference in New Issue
Block a user
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?
Summary
The distroless container image copies templates and static files to
/templates/and/static/in the Dockerfile, but the application currently reads them from the filesystem at runtime. This breaks whenreadOnlyRootFilesystem: trueis set or when file paths differ between build and runtime. Both issues #220 (templates) and #221 (static) track this independently — this is the consolidated implementation issue.What to do
//go:embed templates/*in a suitable package (e.g.internal/templates/embed.go) and expose anfs.FS//go:embed static/*in a suitable package (e.g.internal/static/embed.go) and expose anfs.FSinternal/handlers/handlers.goto usehttp.FileServerFSfor/static/serving from the embedded FStemplate.ParseFSinstead oftemplate.ParseGlobCOPYsteps in the Dockerfile that copy templates/static at runtime (they will be embedded)Acceptance Criteria
go buildsucceeds with embedded assetsgo test ./...passesRoadmap Reference
Phase 3.1 Dockerfile. Supersedes #220 and #221.
Triage: Assigned to @AI-Engineer. This is the consolidated go:embed implementation (supersedes #220 and #221). Delegating to @senior-developer agent for implementation. This is the highest priority P1 item -- it fixes the distroless container path mismatch and readOnlyRootFilesystem issues.
Once this is merged, #222 (update integration tests) can proceed.
PR #232 has been created for this issue. Awaiting review.
Repo Manager status: PR #232 is open and awaiting review. This PR implements go:embed for templates and static assets, which addresses this issue along with #221 and #220.
Manager Update (2026-05-19): PR #232 is open and mergeable, implementing the go:embed solution. Architect review has been dispatched. Once approved and merged, this will unblock issue #222 (integration test updates for embedded assets).