Wiki/infra/forgejo-runner/compose.yml
Corentin JOGUET ecb7a44c3c
Some checks are pending
CI / Lint bridge (Biome) (push) Waiting to run
CI / Type-check bridge (push) Blocked by required conditions
CI / Tests unit bridge (push) Blocked by required conditions
CI / Tests integration bridge (push) Blocked by required conditions
CI / Security scan (push) Waiting to run
CI / Docker build + healthcheck (push) Blocked by required conditions
ops(infra): add Forgejo Actions Runner skeleton
- infra/forgejo-runner/compose.yml : runner v6.5.0 avec auto-register
- infra/forgejo-runner/.env.example : variables registration
- infra/forgejo-runner/README.md : setup + usage + securite + troubleshooting
- infra/README.md : index

Le runner est OPTIONNEL et a deployer separement quand on veut activer le CI
sur git.acadenice.com. Tant que pas deploye, les workflows GitHub Actions
restent actifs sur github.com/AcadeNice/wiki (mirror).
2026-05-07 13:49:19 +02:00

43 lines
1.3 KiB
YAML

name: forgejo-runner
# Forgejo Actions Runner pour git.acadenice.com
# Documentation : https://forgejo.org/docs/latest/admin/actions/
services:
runner:
image: code.forgejo.org/forgejo/runner:6.5.0
restart: unless-stopped
user: "0:0"
environment:
FORGEJO_INSTANCE_URL: ${FORGEJO_INSTANCE_URL:-https://git.acadenice.com}
FORGEJO_RUNNER_REGISTRATION_TOKEN: ${FORGEJO_RUNNER_REGISTRATION_TOKEN}
FORGEJO_RUNNER_NAME: ${FORGEJO_RUNNER_NAME:-runner-acadenice-01}
# Labels permettent aux workflows de cibler ce runner avec `runs-on: <label>`
FORGEJO_RUNNER_LABELS: ${FORGEJO_RUNNER_LABELS:-docker,ubuntu-latest,ubuntu-22.04,acadenice}
volumes:
- runner-data:/data
- /var/run/docker.sock:/var/run/docker.sock
command:
- /bin/sh
- -c
- |
set -e
if [ ! -f /data/.runner ]; then
echo "First boot — registering runner..."
forgejo-runner register \
--no-interactive \
--instance "$$FORGEJO_INSTANCE_URL" \
--name "$$FORGEJO_RUNNER_NAME" \
--token "$$FORGEJO_RUNNER_REGISTRATION_TOKEN" \
--labels "$$FORGEJO_RUNNER_LABELS"
fi
exec forgejo-runner daemon
networks:
- default
volumes:
runner-data:
networks:
default:
name: forgejo-runner