# Forgejo Actions runner — deploy as a standalone Portainer stack.
# The runner connects outbound to Forgejo to receive jobs; no inbound ports needed.
# /var/run/docker.sock is mounted so the build job can run Docker Buildx.
#
# Setup: see the walkthrough at infra/RUNNER_SETUP.md

services:
  act_runner:
    image: gitea/act_runner:latest
    restart: unless-stopped
    environment:
      - GITEA_INSTANCE_URL=https://git.fabledsword.com
      - GITEA_RUNNER_REGISTRATION_TOKEN=${RUNNER_TOKEN}
      - GITEA_RUNNER_NAME=swarm-runner
      # Maps the runs-on: ubuntu-latest label used in workflow files to a Docker image.
      - CONFIG_FILE=/config/config.yml
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - act_runner_data:/data
      - /nfs/data/fabledsword/act_runner/config.yml:/config/config.yml:ro
    # No network needed — runner only makes outbound HTTPS connections to Forgejo.

volumes:
  act_runner_data:
