Files
2026-07-21 14:43:01 +02:00

66 lines
1.6 KiB
YAML

version: "3.8"
services:
app:
image: gitea/act_runner:0.6.1
environment:
- CONFIG_FILE=/config.yaml
- GITEA_INSTANCE_URL
- GITEA_RUNNER_NAME=${RUNNER_NAME}
- GITEA_RUNNER_LABELS=${RUNNER_LABELS}
- GITEA_RUNNER_REGISTRATION_TOKEN_FILE=/run/secrets/reg_token
- RUNNER_CAPACITY=${RUNNER_CAPACITY:-1}
- LOG_LEVEL=${LOG_LEVEL:-info}
secrets:
- reg_token
configs:
- source: config
target: /config.yaml
volumes:
- data:/data
# host Docker socket: job containers run as siblings on the host daemon.
# dind is not offered because swarm ignores `privileged`.
- /var/run/docker.sock:/var/run/docker.sock
networks:
- internal
deploy:
replicas: 1
update_config:
failure_action: rollback
order: start-first
rollback_config:
order: start-first
restart_policy:
max_attempts: 3
resources:
limits:
memory: 1024M
labels:
- "coop-cloud.${STACK_NAME}.version=0.1.0+0.6.1"
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-300}"
- "backupbot.backup=${ENABLE_BACKUPS:-false}"
healthcheck:
# the .runner state file is only written once registration succeeds
test: ["CMD-SHELL", "test -f /data/.runner"]
interval: 30s
timeout: 10s
retries: 10
start_period: 2m
secrets:
reg_token:
external: true
name: ${STACK_NAME}_reg_token_${SECRET_REG_TOKEN_VERSION}
configs:
config:
name: ${STACK_NAME}_config_${CONFIG_VERSION}
file: config.yaml.tmpl
template_driver: golang
volumes:
data:
networks:
internal: