chore: add docker compose for self-hosted Gitea act_runners
Set up the infrastructure-as-code recipe to bring up the three
self-hosted Gitea Actions runners required by ADR-0015. The compose
file launches three act_runner instances pinned to 0.2.13, registered
with the project's Gitea organisation, labelled self-hosted + on-prem
to match the runs-on selector in every job under .gitea/workflows/*.
Layout:
- infra/ new top-level folder for IaC
- infra/README.md explains the folder, registration
flow, security implications, future
placeholders (local/, prod/, runbooks/)
- infra/ci-runners.compose.yml three act_runner services, networked
together, persisting credentials to
./data/runner-N
- infra/.env.example GITEA_INSTANCE_URL +
GITEA_RUNNER_REGISTRATION_TOKEN; .env
itself stays git-ignored (root rule)
- infra/data/.gitignore tracks the dir, ignores runtime state
Security posture (documented in infra/README.md): mounting
/var/run/docker.sock gives the runner root-equivalent access to the
host Docker daemon. Mitigations rely on (a) repo-scope of the runner
in Gitea, (b) running the runner host outside the production trust
boundary, (c) no extra host filesystem mounts. Future hardening
(rootless Docker, DinD sidecar) is flagged as deferred.
The compose pins the runner image (0.2.13). Bumps go through a
dedicated chore(deps) PR per the convention; image upgrades roll one
runner at a time so CI is never starved (procedure documented in the
README).
Doc indexing (docs/README.md) deliberately not touched here to avoid
a conflict with the pending docs/architecture-diagrams branch which
also modifies that file. A small follow-up PR will add an index entry
once that branch is merged.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# infra/.env.example
|
||||
#
|
||||
# Copy to infra/.env (which is git-ignored at the workspace level) and fill in.
|
||||
# Used by infra/ci-runners.compose.yml. See infra/README.md for the full
|
||||
# registration workflow.
|
||||
|
||||
# Gitea base URL — https, no trailing slash.
|
||||
GITEA_INSTANCE_URL=https://git.unespace.com
|
||||
|
||||
# One-time registration token, generated in Gitea:
|
||||
# Site Administration → Actions → Runners → "Create new Runner"
|
||||
# (or Organisation Settings → Actions → Runners for an org-scoped runner).
|
||||
#
|
||||
# Required only on first boot. After the runners successfully register
|
||||
# their credentials persist in infra/data/runner-N/.runner; remove this
|
||||
# value from .env afterwards.
|
||||
GITEA_RUNNER_REGISTRATION_TOKEN=
|
||||
Reference in New Issue
Block a user