Files
canopy-workloads/gitea_runner/README.md
T
kiskaadee 45a9450526 fix(gitea,gitea_runner): use relative state mounts and nix-independent runner base
- Replace ~/var/lib/homelab/<app> with ../../var/lib/homelab/<app> in gitea and gitea_runner compose files so docker compose resolves state without HOME
- Remove inert HOMELAB_STATE_ROOT from gitea_runner/.env-example and update gitea_runner/README.md
- Rebase gitea_runner/Dockerfile on gitea/act_runner:latest with Alpine nodejs/git/bash/coreutils, regular-file /etc/nix/nix.conf, pinned nixos/nix:2.24.12 store, and entrypoint-nix.sh auto-seed wrapper
2026-11-18 23:03:22 -05:00

20 lines
1.5 KiB
Markdown

# Gitea Actions Runner (`gitea_runner`)
Standalone `act_runner` for Gitea Actions, built with Nix (`nix-command` and `flakes` enabled), `git`, `bash`, and `nodejs` for **host-mode (`:host`)** execution.
## Architecture
- **Host-Mode Execution (`:host`)**: Core platform security bans direct Docker socket mounts and enforces a read-only `socket-proxy` (`POST=0`), so `act_runner` cannot spawn `docker://` job containers. Jobs run directly inside the runner container via `:host` labels (`ubuntu-latest:host,nix:host`).
- **Persistent State & Nix Cache**:
- Runner registration and workspace state: `../../var/lib/homelab/gitea_runner:/data` (resolves relative to `~/Workloads/gitea_runner` to `~/var/lib/homelab/gitea_runner` without requiring `HOME` or `${...}` interpolation).
- Nix store cache: named Docker volume `nix-store:/nix` so evaluated derivations persist across rebuilds. If `/nix/var/nix/profiles/default/bin/nix` is missing or broken on an existing volume, `entrypoint-nix.sh` seeds `/nix` from `/opt/nix-seed.tar.gz`.
## Configuration
See [`.env-example`](.env-example) for required runtime variables:
- `GITEA_INSTANCE_URL`: Internal or external Gitea URL (default `http://gitea:3000` over `proxy-net`).
- `GITEA_RUNNER_TOKEN`: One-time runner registration token (injected into `GITEA_RUNNER_REGISTRATION_TOKEN` in Compose).
- `GITEA_RUNNER_NAME`: Runner display name (default `homelab-runner`).
- `GITEA_RUNNER_LABELS`: Comma-separated `:host` labels (default `ubuntu-latest:host,nix:host`).