resolve gitea hostname for ci runner and job containers
All checks were successful
CI / Lint, PostgreSQL tests, and package (push) Successful in 54s

The Gitea instance is published on loopback only, and its public name
still points at an IPv4 address this host no longer has, so the runner
spent seven days failing to fetch tasks with connection refused.

Pin the name to the host's LAN address in both places act_runner needs
it: extra_hosts for the runner container, and container.options for job
and service containers so actions/checkout can clone. nginx already
serves a valid certificate for that name on the LAN address, so no
DNS, nginx, or ROOT_URL change is required, and the existing runner
registration stays valid.
This commit is contained in:
Antoine Vandeplanque 2026-09-30 12:03:42 +02:00
parent 80ca38af0a
commit 2c58234fd9
2 changed files with 10 additions and 0 deletions

View File

@ -6,6 +6,12 @@ services:
entrypoint: ["act_runner"]
command: ["--config", "/config.yaml", "daemon"]
working_dir: /data
# The Gitea instance is published on loopback only, and its public name still
# points at an IPv4 address this host no longer has. Resolve the name to the
# host's LAN address so the runner can reach the Gitea API. Update this together
# with the `options` entry in config.yaml if the LAN address changes.
extra_hosts:
- "gitea.vandeplanque.com:192.168.1.56"
volumes:
- runner-data:/data
- ./config.yaml:/config.yaml:ro

View File

@ -17,6 +17,10 @@ cache:
container:
network: ""
privileged: false
# Job containers need the same name resolution as the runner itself, otherwise the
# checkout step clones from an address the job cannot reach. Must match the
# extra_hosts entry in compose.yaml.
options: "--add-host=gitea.vandeplanque.com:192.168.1.56"
valid_volumes: []
# The daemon uses Docker, but jobs/services do not receive the Docker socket.
docker_host: "-"