Switch to host execution mode — eliminates docker socket passthrough complexity
This commit is contained in:
@@ -2,11 +2,13 @@
|
|||||||
# Deploy on the machine running Gitea (same host).
|
# Deploy on the machine running Gitea (same host).
|
||||||
# Registers at instance level — services all repos.
|
# Registers at instance level — services all repos.
|
||||||
#
|
#
|
||||||
|
# Uses host execution mode — jobs run directly on the host machine,
|
||||||
|
# so Docker commands work natively without socket passthrough complexity.
|
||||||
|
#
|
||||||
# Setup:
|
# Setup:
|
||||||
# 1. Gitea → Site Administration → Actions → Runners → Create Runner → copy token
|
# 1. Gitea → Site Administration → Actions → Runners → Create Runner → copy token
|
||||||
# 2. Create /srv/act-runner/config.yaml (see compose-snippets/act_runner_config.yaml)
|
# 2. Add RUNNER_TOKEN to Portainer stack environment variables
|
||||||
# 3. echo "RUNNER_TOKEN=<token>" > .env
|
# 3. Deploy stack
|
||||||
# 4. docker compose up -d
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
act-runner:
|
act-runner:
|
||||||
@@ -17,12 +19,11 @@ services:
|
|||||||
- GITEA_INSTANCE_URL=https://git.thewichersfamily.com
|
- GITEA_INSTANCE_URL=https://git.thewichersfamily.com
|
||||||
- GITEA_RUNNER_REGISTRATION_TOKEN=${RUNNER_TOKEN}
|
- GITEA_RUNNER_REGISTRATION_TOKEN=${RUNNER_TOKEN}
|
||||||
- GITEA_RUNNER_NAME=homelab-pi5
|
- GITEA_RUNNER_NAME=homelab-pi5
|
||||||
- GITEA_RUNNER_LABELS=ubuntu-latest:docker://node:20-bookworm,ubuntu-22.04:docker://node:20-bookworm
|
# host mode: jobs run directly on this machine — Docker is available natively
|
||||||
- CONFIG_FILE=/etc/act_runner/config.yaml
|
- GITEA_RUNNER_LABELS=ubuntu-latest:host,ubuntu-22.04:host
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
- act_runner_data:/data
|
- act_runner_data:/data
|
||||||
- /srv/act-runner/config.yaml:/etc/act_runner/config.yaml:ro
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
act_runner_data:
|
act_runner_data:
|
||||||
|
|||||||
Reference in New Issue
Block a user