How to setup Gitea Runner in 5 minutes using docker-compose
docker-compose.yml
services:
runner:
image: gitea/act_runner:latest-dind-rootless
restart: unless-stopped
privileged: true
environment:
GITEA_INSTANCE_URL: https://gitea.my-domain.com
GITEA_RUNNER_REGISTRATION_TOKEN: n73HEsTX71NMoVFJoMVSCEpin2IeihDnJZHELnNs
GITEA_RUNNER_NAME: myrunner
DOCKER_HOST: unix:///var/run/user/1000/docker.sock
volumes:
- ./data:/data
- /var/run/docker.sock:/var/run/docker.sock
Now create the data
directory and make sure it’s owned by the user running the scripts:
mkdir -p data && chown -R 1000:1000 data
Now you can start the runner with
docker-compose up
The startup script will automatically register the runner and place the configuration in the data
directory.
Setup up autostart
You can now use our script from Create a systemd service for your docker-compose project in 10 seconds to setup systemd
-based autostart:
curl -fsSL https://techoverflow.net/scripts/create-docker-compose-service.sh | sudo bash /dev/stdin
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow