Move Gitea to its own LXC; keep a forwarder on stpvm
Test and deploy / test (push) Successful in 17s
Test and deploy / deploy (push) Successful in 2s

Gitea (git, Actions, the registry) now runs from gitea/docker-compose.yml
on a separate Proxmox LXC with its own Postgres, deployed by hand. The
stack's gitea service becomes an haproxy TCP forwarder from stpvm's 3000
and 2222 to the LXC (GITEA_UPSTREAM), under the same container name, so
Caddy, the backend feed, usaco, the runner, Renovate and every repo's CI
keep their addresses. Webhooks from the LXC reach Caddy over the LAN.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-24 15:42:44 +00:00
co-authored by Claude Opus 5.5
parent aa4c3b1a67
commit 10606f4c77
13 changed files with 381 additions and 148 deletions
+5 -11
View File
@@ -16,12 +16,11 @@
#
# Keep it in step with .env.example: a new variable goes in both. Settings that
# are not secrets (hosts, ports, timezone) keep .env.example's defaults; values
# a service parses (Garage's hex secrets, Gitea's base64 JWT keys, the S3 key
# id) are dummies in the exact shape it requires, or that service won't start.
# a service parses (Garage's hex secrets, the S3 key id) are dummies in the exact shape it requires, or that service won't start.
#
# The dummy Postgres credentials only work on a database volume created with
# them: an existing dbdata volume keeps whatever password it was initialised
# with. Only POSTGRES_DB is created on a fresh volume; the gitea, jobs and
# with. Only POSTGRES_DB is created on a fresh volume; the jobs and
# tracker databases and roles still have to be created by hand (.env.example).
# =============================================================================
@@ -39,16 +38,11 @@ POSTGRES_TRACKER_USER=tracker
POSTGRES_TRACKER_PASSWORD=dev-tracker-password
# --- Gitea -------------------------------------------------------------------
# The two JWT secrets must decode as base64url of 32 bytes; these decode to
# the text "dev-only-not-a-secret-0123456789".
# Dev has no Gitea: the forwarder points at a TEST-NET address that never
# answers, so /gitea/ is a 502 and the home page's git feed is empty.
GITEA_HOST=gitea
GITEA_PORT=3000
GITEA_INTERNAL_TOKEN=dev-gitea-internal-token
GITEA_LFS_JWT_SECRET=ZGV2LW9ubHktbm90LWEtc2VjcmV0LTAxMjM0NTY3ODk
GITEA_OAUTH2_JWT_SECRET=ZGV2LW9ubHktbm90LWEtc2VjcmV0LTAxMjM0NTY3ODk
POSTGRES_GITEA_DB=gitea
# Blank means localhost.
GITEA_SSH_DOMAIN=
GITEA_UPSTREAM=192.0.2.1
# --- Gitea Actions runner ----------------------------------------------------
# The runner is not part of the compose stack; nothing in dev reads these.