Add Forgejo forge to phd-tower #43

Merged
parkerhdavis merged 1 commit from forgejo-phd-tower into main 2026-10-12 19:43:47 -06:00
parkerhdavis commented 2026-10-12 19:43:37 -06:00 (Migrated from github.com)

Summary

Adds a self-hosted Forgejo forge (plus its Postgres container) to docker-compose.phd-tower.yml, filling the VCS-hosting hole the Perforce Helix Core removal (#35) left in the stack. The design was worked out in the Forgejo Forge Plan in the Software-Wiki (50 Cumulus, 90-99 Agents/Transient), with decisions taken there on 2026-10-12: Postgres, HTTPS + SSH exposure via Pangolin, Git LFS enabled for game projects' binary assets.

What's in it

  • Forgejo service — codeberg.org/forgejo/forgejo:16 (major-pinned; patch releases ride make pull, major bumps are manual per Forgejo's upgrade docs) on a private compose network with forgejo-db (Postgres 16-alpine, healthchecked).
  • Headless install, no web wizard — configuration is entirely FORGEJO__* environment variables fed from .env; INSTALL_LOCK=true makes first boot run migrations directly, and DISABLE_REGISTRATION=true closes public sign-up before the forge ever serves a request. The admin account is created once through the container CLI. No app.ini template to render — a fresh deploy reproduces from this repo plus .env.
  • Git LFS on from the start — LFS_START_SERVER=true with the LFS JWT secret from .env; LFS rides the same HTTPS endpoint as the UI. This is the feature game projects need that the rest of the stack has no story for yet.
  • Exposure via Pangolin, both transports — web UI and git-over-HTTPS published on 127.0.0.1:3000 for a Pangolin HTTP resource at forge.${BASE_DOMAIN}; the built-in SSH server published on 127.0.0.1:2222 for a Pangolin raw TCP resource, the same pattern the old p4 passthrough used (Security Review finding #11). Ports stay loopback-bound, and Forgejo's trusted-proxy defaults are correct as-is because the tunnel arrives on loopback.
  • make setup phd-tower gains its branch — it currently falls through silently. New branch creates FORGEJO_DATA_PATH and refuses to proceed if any of the four Forgejo secrets is unset, empty, or left at changeme.
  • .env.example — the six Forgejo variables with generation one-liners and the uid/gid 1000 ownership caution; README — Forgejo row in the tower services table.

Verification

  • docker compose -f docker-compose.phd-tower.yml config -q passes.
  • The new make setup phd-tower branch was exercised in a sandbox copy for all five failure shapes (all set, changeme value, empty value, unset variable, missing FORGEJO_DATA_PATH) — every failure exits with a named error, and the good case creates the directory and proceeds.
  • Deployment (first boot, admin creation, the two Pangolin resources, clone/LFS/SSH verification) is the follow-up run on the tower itself, tracked on the Software-Wiki Cumulus board.
## Summary Adds a self-hosted Forgejo forge (plus its Postgres container) to `docker-compose.phd-tower.yml`, filling the VCS-hosting hole the Perforce Helix Core removal (#35) left in the stack. The design was worked out in the Forgejo Forge Plan in the Software-Wiki (50 Cumulus, 90-99 Agents/Transient), with decisions taken there on 2026-10-12: Postgres, HTTPS + SSH exposure via Pangolin, Git LFS enabled for game projects' binary assets. ## What's in it - **Forgejo service** — `codeberg.org/forgejo/forgejo:16` (major-pinned; patch releases ride `make pull`, major bumps are manual per Forgejo's upgrade docs) on a private compose network with `forgejo-db` (Postgres 16-alpine, healthchecked). - **Headless install, no web wizard** — configuration is entirely `FORGEJO__*` environment variables fed from `.env`; `INSTALL_LOCK=true` makes first boot run migrations directly, and `DISABLE_REGISTRATION=true` closes public sign-up before the forge ever serves a request. The admin account is created once through the container CLI. No `app.ini` template to render — a fresh deploy reproduces from this repo plus `.env`. - **Git LFS on from the start** — `LFS_START_SERVER=true` with the LFS JWT secret from `.env`; LFS rides the same HTTPS endpoint as the UI. This is the feature game projects need that the rest of the stack has no story for yet. - **Exposure via Pangolin, both transports** — web UI and git-over-HTTPS published on `127.0.0.1:3000` for a Pangolin HTTP resource at `forge.${BASE_DOMAIN}`; the built-in SSH server published on `127.0.0.1:2222` for a Pangolin raw TCP resource, the same pattern the old p4 passthrough used (Security Review finding #11). Ports stay loopback-bound, and Forgejo's trusted-proxy defaults are correct as-is because the tunnel arrives on loopback. - **`make setup phd-tower` gains its branch** — it currently falls through silently. New branch creates `FORGEJO_DATA_PATH` and refuses to proceed if any of the four Forgejo secrets is unset, empty, or left at `changeme`. - **`.env.example`** — the six Forgejo variables with generation one-liners and the uid/gid 1000 ownership caution; **README** — Forgejo row in the tower services table. ## Verification - `docker compose -f docker-compose.phd-tower.yml config -q` passes. - The new `make setup phd-tower` branch was exercised in a sandbox copy for all five failure shapes (all set, `changeme` value, empty value, unset variable, missing `FORGEJO_DATA_PATH`) — every failure exits with a named error, and the good case creates the directory and proceeds. - Deployment (first boot, admin creation, the two Pangolin resources, clone/LFS/SSH verification) is the follow-up run on the tower itself, tracked on the Software-Wiki Cumulus board.
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!43
No description provided.