docker-compose example: do not use depends_on
Wait for the .runner file to exist instead as a proof that the runner is ready to accept a job
This commit is contained in:
parent
e385811e74
commit
82b6df801f
2 changed files with 4 additions and 7 deletions
|
@ -7,9 +7,6 @@ services:
|
||||||
image: alpine:3.19
|
image: alpine:3.19
|
||||||
links:
|
links:
|
||||||
- forgejo
|
- forgejo
|
||||||
depends_on:
|
|
||||||
runner-register:
|
|
||||||
condition: service_completed_successfully
|
|
||||||
command: >-
|
command: >-
|
||||||
sh -ec '
|
sh -ec '
|
||||||
apk add --quiet git curl jq ;
|
apk add --quiet git curl jq ;
|
||||||
|
|
|
@ -84,10 +84,10 @@ services:
|
||||||
DOCKER_HOST: tcp://docker:2376
|
DOCKER_HOST: tcp://docker:2376
|
||||||
DOCKER_CERT_PATH: /certs/client
|
DOCKER_CERT_PATH: /certs/client
|
||||||
DOCKER_TLS_VERIFY: "1"
|
DOCKER_TLS_VERIFY: "1"
|
||||||
depends_on:
|
|
||||||
runner-register:
|
|
||||||
condition: service_completed_successfully
|
|
||||||
volumes:
|
volumes:
|
||||||
- /srv/runner-data:/data
|
- /srv/runner-data:/data
|
||||||
- docker_certs:/certs
|
- docker_certs:/certs
|
||||||
command: "forgejo-runner --config config.yml daemon"
|
command: >-
|
||||||
|
bash -c '
|
||||||
|
while : ; do test -w .runner && forgejo-runner --config config.yml daemon ; sleep 1 ; done
|
||||||
|
'
|
||||||
|
|
Loading…
Reference in a new issue