Harden the Forgejo data mount against placeholder values #46
Loading…
Reference in a new issue
No description provided.
Delete branch "forgejo-bind-hardening"
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
A short-syntax mount of
${FORGEJO_DATA_PATH}:/datawith a bare-word value — thechangemeplaceholder, straight from.env.example— parses as a named volume reference and fails the entire compose project (service "forgejo" refers to undefined volume changeme). Because everymakecommand parses the compose file first,make rebuild phd-tower/clean/downall refused to run on the tower until the variable was given a real value — exactly the wrong moment for a stack to be unmanageable. This bit during today's first deploy.The Forgejo bind moves to the long syntax (
type: bind/source:/target:), where compose treats the value as a path unconditionally: a placeholder or mis-typed value degrades to a harmless wrong-directory mount instead of a project that cannot parse. A comment in the service records the lesson, and.env.examplemarks the variable as an absolute path.Verification
docker compose -f docker-compose.phd-tower.yml config -qpasses.FORGEJO_DATA_PATHis correctly set (same bind, same target).