feat: add docker-compose configuration and environment files for Forgejo runner deployment

This commit is contained in:
vickytechkey 2026-08-08 18:42:30 +05:30
parent b4770f04a2
commit a8cd1d855e
2 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,2 @@
# Forgejo Runner Registration Token
FORGEJO_RUNNER_REGISTRATION_TOKEN=your_runner_registration_token_here

View file

@ -0,0 +1,20 @@
services:
runner:
image: code.forgejo.org/forgejo/runner:3.0.0
container_name: forgejo-runner
user: "0:0"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data:/data
environment:
- FORGEJO_INSTANCE_URL=http://16.113.57.127:3000
- FORGEJO_RUNNER_REGISTRATION_TOKEN=${FORGEJO_RUNNER_REGISTRATION_TOKEN}
restart: unless-stopped
entrypoint: |
sh -c "
cd /data;
if [ ! -f .runner ]; then
forgejo-runner register --no-interactive --instance $${FORGEJO_INSTANCE_URL} --token $${FORGEJO_RUNNER_REGISTRATION_TOKEN} --name local-runner --labels ubuntu-latest:docker://node:22-alpine,ubuntu-22.04:docker://node:22-alpine,ubuntu-20.04:docker://node:20-alpine;
fi;
forgejo-runner daemon;
"