Pass runner registration token into act_runner

This commit is contained in:
agentbox committed 2026-11-05 13:04:28 +00:00
1 parent 073e45b453
commit 76a9c58dbf
3 files changed
+33 -7

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
# Copy to .env for initial runner registration.
GITEA_RUNNER_REGISTRATION_TOKEN=
GITEA_RUNNER_NAME=gvisor-runner
+28 -7
View File
@@ -110,16 +110,37 @@ docker compose logs -f runner
- `config.yaml` — act_runner configuration (included here). - `config.yaml` — act_runner configuration (included here).
- `.runner` — registration state, created on first registration. - `.runner` — registration state, created on first registration.
If the runner has not been registered yet, provide a registration token on the The Compose file passes `GITEA_RUNNER_REGISTRATION_TOKEN` into the runner
first boot. One way is to add this to the `runner` service temporarily: container. On first boot, put the token in `.env`:
```yaml ```bash
environment: cp .env.example .env
GITEA_RUNNER_REGISTRATION_TOKEN: <token> # edit GITEA_RUNNER_REGISTRATION_TOKEN
docker compose up -d runner
``` ```
Then start the runner once, confirm `./runner/.runner` exists, and remove the Then confirm registration:
token from the Compose environment again.
```bash
docker compose logs -f runner
# look for: Runner registered successfully
ls -l runner/.runner
```
Remove the token from `.env` after `.runner` exists if you prefer. If a stale
or invalid `./runner/.runner` exists, remove it before retrying:
```bash
rm -f runner/.runner
docker compose up -d --force-recreate runner
```
If the public URL is not reachable from inside the runner container, use the
internal Gitea address instead:
```yaml
GITEA_INSTANCE_URL: http://gitea:3000
```
The public Gitea instance is expected at: The public Gitea instance is expected at:
+2
View File
@@ -51,5 +51,7 @@ services:
environment: environment:
CONFIG_FILE: /data/config.yaml CONFIG_FILE: /data/config.yaml
GITEA_INSTANCE_URL: https://gitea.ct.cozytren.ch GITEA_INSTANCE_URL: https://gitea.ct.cozytren.ch
GITEA_RUNNER_REGISTRATION_TOKEN: ${GITEA_RUNNER_REGISTRATION_TOKEN:-}
GITEA_RUNNER_NAME: ${GITEA_RUNNER_NAME:-}
volumes: volumes:
- ./runner:/data - ./runner:/data