fix(cache): expose embedded cache to job containers via host

act_runner's defaults autodetect its own container IP as the cache
host, which per-job networks can't route to — every actions/cache
restore and save hit a 5-minute ETIMEDOUT. Add a config.yaml that
pins the cache port and advertises host.docker.internal, publish
that port on the host, and inject --add-host=host-gateway into
job containers so the hostname resolves inside isolated networks.
This commit is contained in:
Julien Calixte
2026-06-06 23:25:06 +02:00
parent 0c545ee741
commit a6b403e350
2 changed files with 12 additions and 0 deletions

8
config.yaml Normal file
View File

@@ -0,0 +1,8 @@
cache:
enabled: true
dir: "/data/cache"
host: "host.docker.internal"
port: 42951
container:
options: "--add-host=host.docker.internal:host-gateway"

View File

@@ -6,9 +6,13 @@ services:
GITEA_INSTANCE_URL: "https://git.apoena.dev" GITEA_INSTANCE_URL: "https://git.apoena.dev"
GITEA_RUNNER_REGISTRATION_TOKEN: "${GITEA_RUNNER_REGISTRATION_TOKEN}" GITEA_RUNNER_REGISTRATION_TOKEN: "${GITEA_RUNNER_REGISTRATION_TOKEN}"
GITEA_RUNNER_NAME: "coolify-runner" GITEA_RUNNER_NAME: "coolify-runner"
CONFIG_FILE: "/config/config.yaml"
ports:
- "42951:42951"
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- runner_data:/data - runner_data:/data
- ./config.yaml:/config/config.yaml:ro
volumes: volumes:
runner_data: runner_data: