Example runner using docker compose
- Shell 100%
| compose.yml | ||
| LICENSE | ||
| prep-runner.sh | ||
| README.md | ||
exampleRunnerUsingCompose
This repository contains a sample setup that can be used to create and setup a runner based on the Forgejo docs.
Steps
- Create an
oc-runnersdirectory somewhere, this is used to place your compose file and where runner data will live. - Place the
compose.ymlfile in theoc-runnersdirectory. - Inside the
compose.ymlfile, replace "your-path-to" with the absolute path to theoc-runnersdirectory. - Place the
prep-runner.shfile in theoc-runnersdirectory. This shell script assumes / was tested with Ubuntu. - Then execute:
./oc-runners$ ./prep-runner.sh runner1
./oc-runners$ sudo docker compose up -d
./oc-runners$ sudo docker exec -it oc-runner-1 /bin/sh
~ $ forgejo-runner register
- Answer the questions.
- After registration is completed, shutdown the runner and edit the
compose.ymlfile.
note: you can find the registration code to create a runner under "settings" > "actions" > "runners" > "create new runner" - UNcomment the line containing
forgejo-runner daemon. - Comment OUT the line containing the
do sleep 1and save. - Restart the runner using normal compose commands.
The now registered runner should be connecting to OpenCommit and become available for your use.