Pass runner registration token into act_runner
This commit is contained in:
1 parent
073e45b453
commit
76a9c58dbf
3 files changed
+33
-7
No files matched your search
@@ -0,0 +1,3 @@
|
||||
# Copy to .env for initial runner registration.
|
||||
GITEA_RUNNER_REGISTRATION_TOKEN=
|
||||
GITEA_RUNNER_NAME=gvisor-runner
|
||||
@@ -110,16 +110,37 @@ docker compose logs -f runner
|
||||
- `config.yaml` — act_runner configuration (included here).
|
||||
- `.runner` — registration state, created on first registration.
|
||||
|
||||
If the runner has not been registered yet, provide a registration token on the
|
||||
first boot. One way is to add this to the `runner` service temporarily:
|
||||
The Compose file passes `GITEA_RUNNER_REGISTRATION_TOKEN` into the runner
|
||||
container. On first boot, put the token in `.env`:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
GITEA_RUNNER_REGISTRATION_TOKEN: <token>
|
||||
```bash
|
||||
cp .env.example .env
|
||||
# edit GITEA_RUNNER_REGISTRATION_TOKEN
|
||||
docker compose up -d runner
|
||||
```
|
||||
|
||||
Then start the runner once, confirm `./runner/.runner` exists, and remove the
|
||||
token from the Compose environment again.
|
||||
Then confirm registration:
|
||||
|
||||
```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:
|
||||
|
||||
|
||||
@@ -51,5 +51,7 @@ services:
|
||||
environment:
|
||||
CONFIG_FILE: /data/config.yaml
|
||||
GITEA_INSTANCE_URL: https://gitea.ct.cozytren.ch
|
||||
GITEA_RUNNER_REGISTRATION_TOKEN: ${GITEA_RUNNER_REGISTRATION_TOKEN:-}
|
||||
GITEA_RUNNER_NAME: ${GITEA_RUNNER_NAME:-}
|
||||
volumes:
|
||||
- ./runner:/data
|
||||
Reference in new issue
Block a user