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
@@ -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:
|
||||
|
||||
|
||||
Reference in new issue
Block a user