mirror of
https://git.straybits.ca/straybits/docker-samples.git
synced 2024-11-07 18:22:26 +00:00
resolve lost label issue on runners
This commit is contained in:
parent
9e3a8d6395
commit
f0f9f608cc
3 changed files with 4 additions and 8 deletions
|
@ -33,4 +33,5 @@ ROOT_PASSWORD= ##REQUIRED##
|
||||||
SHARED_SECRET= ##REQUIRED##
|
SHARED_SECRET= ##REQUIRED##
|
||||||
|
|
||||||
# Runner name / labels
|
# Runner name / labels
|
||||||
RUNNER_NAME=runner
|
RUNNER_NAME=runner
|
||||||
|
RUNNER_LABELS='[\"docker:docker://code.forgejo.org/oci/node:20-bookworm\", \"ubuntu-22.04:docker://catthehacker/ubuntu:act-22.04\"]'
|
|
@ -24,9 +24,3 @@ https://www.straybits.ca/2014/self-hosted-git-server/
|
||||||
7. Wait a bit more
|
7. Wait a bit more
|
||||||
8. Visit `https://git.yourdomain.com` in your browser and login with the admin credentials in your `.env` file.
|
8. Visit `https://git.yourdomain.com` in your browser and login with the admin credentials in your `.env` file.
|
||||||
9. Verify settings. (i.e. do you want to disable user signups, etc.)
|
9. Verify settings. (i.e. do you want to disable user signups, etc.)
|
||||||
|
|
||||||
## Known Issue
|
|
||||||
|
|
||||||
### Disappearing Runner Labels
|
|
||||||
|
|
||||||
If your runner labels disappear after a restart, you may need to update your runner's `config.yml` to have the same list of runners as found in your `.runner` file.
|
|
|
@ -87,9 +87,10 @@ services:
|
||||||
forgejo-runner create-runner-file --connect --instance http://server:3000 --name ${RUNNER_NAME} --secret ${SHARED_SECRET} && break ;
|
forgejo-runner create-runner-file --connect --instance http://server:3000 --name ${RUNNER_NAME} --secret ${SHARED_SECRET} && break ;
|
||||||
sleep 1 ;
|
sleep 1 ;
|
||||||
done ;
|
done ;
|
||||||
sed -i -e "s|\"labels\": null|\"labels\": [\"docker:docker://code.forgejo.org/oci/node:20-bookworm\", \"ubuntu-22.04:docker://catthehacker/ubuntu:act-22.04\"]|" .runner ;
|
sed -i -e "s|\"labels\": null|\"labels\": ${RUNNER_LABELS}|" .runner ;
|
||||||
forgejo-runner generate-config > config.yml ;
|
forgejo-runner generate-config > config.yml ;
|
||||||
sed -i -e "s|network: .*|network: host|" config.yml ;
|
sed -i -e "s|network: .*|network: host|" config.yml ;
|
||||||
|
sed -i -e "s|^ labels: \[\]$$| labels: ${RUNNER_LABELS}|" config.yml ;
|
||||||
sed -i -e "s|^ envs:$$| envs:\n DOCKER_HOST: tcp://docker:2376\n DOCKER_TLS_VERIFY: 1\n DOCKER_CERT_PATH: /certs/client|" config.yml ;
|
sed -i -e "s|^ envs:$$| envs:\n DOCKER_HOST: tcp://docker:2376\n DOCKER_TLS_VERIFY: 1\n DOCKER_CERT_PATH: /certs/client|" config.yml ;
|
||||||
sed -i -e "s|^ options:| options: -v /certs/client:/certs/client|" config.yml ;
|
sed -i -e "s|^ options:| options: -v /certs/client:/certs/client|" config.yml ;
|
||||||
sed -i -e "s| valid_volumes: \[\]$$| valid_volumes:\n - /certs/client|" config.yml ;
|
sed -i -e "s| valid_volumes: \[\]$$| valid_volumes:\n - /certs/client|" config.yml ;
|
||||||
|
|
Loading…
Reference in a new issue