services: runner: image: code.forgejo.org/forgejo/runner:6.3.1 container_name: camptickets-runner restart: unless-stopped working_dir: /data # Grant access to the host Docker socket group so the (uid 1000) runner can # talk to the daemon. Set DOCKER_GID in runner/.env to your host's # `stat -c %g /var/run/docker.sock` if it differs. group_add: - "${DOCKER_GID:-988}" volumes: - ./data:/data # config.yaml allows the build workflow to mount the persistent cache # volumes (valid_volumes); without it those mounts are rejected. - ./config.yaml:/data/config.yaml:ro # Runner spawns job containers via the host Docker daemon. - /var/run/docker.sock:/var/run/docker.sock env_file: .env environment: RUNNER_NAME: ${RUNNER_NAME:-camptickets-runner} # Register on first boot (when no .runner config exists yet), then run the # daemon. The `docker` label maps to the node:22-bookworm job image the # build-apk workflow expects (it installs the Android SDK itself). command: - sh - -c - | if [ ! -f /data/.runner ]; then echo "Registering runner with git.mowden.top ..." forgejo-runner register --no-interactive \ --instance https://git.mowden.top \ --token "${REGISTRATION_TOKEN}" \ --name "${RUNNER_NAME:-camptickets-runner}" \ --labels "docker:docker://node:22-bookworm" fi exec forgejo-runner daemon --config /data/config.yaml