Initial commit

This commit is contained in:
Liviu Burcusel 2025-12-12 11:31:30 +01:00
commit ee850e8db0
Signed by: liviu
GPG key ID: 6CDB37A4AD2C610C
4 changed files with 301 additions and 0 deletions

68
README.md Normal file
View file

@ -0,0 +1,68 @@
# Forgejo runner
## Installation
### Prerequisites
- git
- working Forgejo server
- working docker installation
### Setup
#### **Clone the repository**
```bash
git clone ssh://git@git.burcusel.nl:2222/public/forgejo-runner.git
```
#### **Customize docker_compose.yml**
Edit `docker_compose.yml` and change following keys
- services.runner
- image // Set the version to the latest
- container_name // Give the container a meaningful name
- cpus, cpuset // Optional if you want to control how many cpus are used
```bash
vim runner/docker-compose.yml
```
#### **Up we go!**
```bash
docker compose up -d
```
#### **Register your runner**
In your newly created container run `forgejo-runner register` and follow on screen instruction. You can get more info in
the [documentation](https://forgejo.org/docs/latest/admin/actions/runner-installation/#standard-registration).
After successfully register edit `.runner` file and modify **labels** section with the values from `.runner.example`
```bash
docker exec -it ${YOUR-CONTAINER-NAME} /bin/sh
forgejo-runner register
```
#### **Finalize setup**
Edit `docker_compose.yml` and comment the current active command line and un-comment the next one. It should look like this:
```bash
services:
runner:
...
# command: '/bin/sh -c "while : ; do sleep 1 ; done ;"'
command: '/bin/sh -c "sleep 5; forgejo-runner daemon --config /data/config.yml"'
...
```
After changes are made, rebuild the container.
```bash
docker compose down
docker compose up -d
```