Harden the Forgejo data mount against placeholder values #46

Merged
parkerhdavis merged 1 commit from forgejo-bind-hardening into main 2026-10-12 20:38:28 -06:00
parkerhdavis commented 2026-10-12 20:38:21 -06:00 (Migrated from github.com)

Summary

A short-syntax mount of ${FORGEJO_DATA_PATH}:/data with a bare-word value — the changeme placeholder, straight from .env.example — parses as a named volume reference and fails the entire compose project (service "forgejo" refers to undefined volume changeme). Because every make command parses the compose file first, make rebuild phd-tower / clean / down all 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.example marks the variable as an absolute path.

Verification

  • docker compose -f docker-compose.phd-tower.yml config -q passes.
  • No behavior change when FORGEJO_DATA_PATH is correctly set (same bind, same target).
## Summary A short-syntax mount of `${FORGEJO_DATA_PATH}:/data` with a bare-word value — the `changeme` placeholder, straight from `.env.example` — parses as a **named volume reference** and fails the entire compose project (`service "forgejo" refers to undefined volume changeme`). Because every `make` command parses the compose file first, `make rebuild phd-tower` / `clean` / `down` all 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.example` marks the variable as an absolute path. ## Verification - `docker compose -f docker-compose.phd-tower.yml config -q` passes. - No behavior change when `FORGEJO_DATA_PATH` is correctly set (same bind, same target).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
parker/cumulus!46
No description provided.