3
0
Fork 0
Example runner using docker compose
Find a file
2026-02-04 22:22:57 +00:00
compose.yml fix: reverse commenting to comply with docs 2026-02-02 16:21:58 +00:00
LICENSE Initial commit 2026-02-02 15:43:42 +00:00
prep-runner.sh add prep-runner.sh 2026-02-02 16:02:51 +00:00
README.md Update README.md 2026-02-04 22:22:57 +00:00

exampleRunnerUsingCompose

This repository contains a sample setup that can be used to create and setup a runner based on the Forgejo docs.

Steps

  1. Create an oc-runners directory somewhere, this is used to place your compose file and where runner data will live.
  2. Place the compose.yml file in the oc-runners directory.
  3. Inside the compose.yml file, replace "your-path-to" with the absolute path to the oc-runners directory.
  4. Place the prep-runner.sh file in the oc-runners directory. This shell script assumes / was tested with Ubuntu.
  5. 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
  1. Answer the questions.
  2. After registration is completed, shutdown the runner and edit the compose.yml file.
    note: you can find the registration code to create a runner under "settings" > "actions" > "runners" > "create new runner"
  3. UNcomment the line containing forgejo-runner daemon.
  4. Comment OUT the line containing the do sleep 1 and save.
  5. Restart the runner using normal compose commands.

The now registered runner should be connecting to OpenCommit and become available for your use.