fix(build): copy fj-mcp askama.toml into Docker builds #74
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/FJ-60-copy-askama-toml-docker"
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?
Problem
The
build-binary-static.ymlpublish job failed onmain(run #381, commit891d0d5e) with a real compile error infj-mcp:template "instance.html" not found in directories ["/build/crates/fj-mcp/templates"], which makes theInstanceTemplatederive fail to compile.Root cause
FJ-55 gave
fj-mcpits own server-rendered Forgejo-instance page. The template lives atcrates/fj-mcp/src/web/templates/instance.html, andcrates/fj-mcp/askama.toml(dirs = ["src/web/templates"]) redirects the askama loader away from the defaultcrates/fj-mcp/templates. The template file itself is committed and copied byCOPY crates/fj-mcp/src, but all three build files copy the source without ever copyingaskama.toml. Inside the image askama therefore fell back to its defaultcrates/fj-mcp/templatesdirectory, found nothing, and failed the derive. The triage note on FJ-60 guessed the template was never committed; that is not the case, the config that points at it was simply never copied into the build.Fix
Copy
crates/fj-mcp/askama.tomlalongside the crate source in all three build files:oci-build/Dockerfile,oci-build/Dockerfile.static, andoci-build/Dockerfile.windows. The dummy-prime layer needs no change, it compiles an emptylib.rswith noTemplatederives.Verification
Dockerfile.staticbuilder stage (the exact file that failed CI):fj-mcpcompiles cleanly with--features update-check, including theInstanceTemplatederive.just pre-commitpassed, whosecheck-dockerstep builds the regularoci-build/Dockerfilebuilder stage.Closes FJ-60.