fix(gitea): runner config for caching 4

This commit is contained in:
2026-08-24 11:26:54 +02:00
parent 99ff1c0c4e
commit 0d85ef73b9
3 changed files with 52 additions and 12 deletions
+30
View File
@@ -74,10 +74,40 @@ services:
GITEA_RUNNER_NAME: docker-runner
GITEA_RUNNER_LABELS: ubuntu-latest:docker://catthehacker/ubuntu:act-latest,ubuntu-22.04:docker://catthehacker/ubuntu:act-22.04,ubuntu-20.04:docker://catthehacker/ubuntu:act-20.04
DOCKER_HOST: unix:///var/run/docker.sock
# Lets this container itself resolve host.docker.internal too (used by
# cache.external_server in runner-config.yaml) - the daemon needs this
# for its own pre-registration calls to runner-cache-server, separately
# from job containers (which get it via container.options's --add-host).
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ../.data/gitea/runner:/data
- /var/run/docker.sock:/var/run/docker.sock
- ./runner-config.yaml:/data/config.yaml:ro
- ../.data/gitea/cache_secret:/data/cache_secret:ro
restart: always
networks:
- compose_network
runner-cache-server:
image: gitea/act_runner:latest
container_name: gitea_runner_cache
command: ["act_runner", "cache-server", "--config", "/data/config.yaml", "--host", "0.0.0.0", "--port", "8088", "--dir", "/data/cache"]
environment:
TZ: ${TIMEZONE:-Europe/Amsterdam}
ports:
# Published so job containers - isolated on their own per-task Docker
# network, unreachable via container name regardless of network
# settings we tried - can still reach it via host.docker.internal,
# which resolves to their own network's gateway and routes back to
# this published port. Exposed on the VPS's public interface too;
# requests without a valid job's bearer token are rejected, but
# consider a firewall rule restricting this to Docker's private
# bridge ranges (172.16.0.0/12) if that's a concern.
- "8088:8088"
volumes:
- ../.data/gitea/runner-cache:/data/cache
- ./cache-server-config.yaml:/data/config.yaml:ro
- ../.data/gitea/cache_secret:/data/cache_secret:ro
restart: always
networks:
- compose_network