diff --git a/examples/docker-compose/compose-forgejo-and-runner-with-envs.yml b/examples/docker-compose/compose-forgejo-and-runner-with-envs.yml index a84908b..8cd8f11 100644 --- a/examples/docker-compose/compose-forgejo-and-runner-with-envs.yml +++ b/examples/docker-compose/compose-forgejo-and-runner-with-envs.yml @@ -19,7 +19,7 @@ volumes: services: - docker-in-docker: + docker-in-docker-envs: image: code.forgejo.org/oci/docker:dind hostname: docker # Must set hostname as TLS certificates are only valid for docker or localhost privileged: true @@ -29,7 +29,7 @@ services: volumes: - docker_certs:/certs - forgejo: + forgejo-envs: image: codeberg.org/forgejo/forgejo:1.21 command: >- bash -c ' @@ -50,11 +50,11 @@ services: ports: - 8080:3000 - runner-register: + runner-register-envs: image: code.forgejo.org/forgejo/runner:3.4.1 links: - - docker-in-docker - - forgejo + - docker-in-docker-envs + - forgejo-envs environment: DOCKER_HOST: tcp://docker-in-docker:2376 volumes: @@ -62,6 +62,7 @@ services: user: 0:0 command: >- bash -ec ' + sleep 15 ; while : ; do forgejo-runner create-runner-file --connect --instance http://forgejo:3000 --name runner --secret {SHARED_SECRET} && break ; sleep 1 ; @@ -74,8 +75,8 @@ services: runner-daemon-envs: image: code.forgejo.org/forgejo/runner:3.4.1 links: - - docker-in-docker - - forgejo + - docker-in-docker-envs + - forgejo-envs environment: DOCKER_HOST: tcp://docker:2376 DOCKER_CERT_PATH: /certs/client @@ -96,5 +97,6 @@ services: - docker_certs:/certs command: >- bash -c ' + sleep 15 ; while : ; do test -w .runner && forgejo-runner --config config.yml daemon ; sleep 1 ; done ' diff --git a/examples/docker-compose/compose-forgejo-and-runner.yml b/examples/docker-compose/compose-forgejo-and-runner.yml index 19e7078..9d2b562 100644 --- a/examples/docker-compose/compose-forgejo-and-runner.yml +++ b/examples/docker-compose/compose-forgejo-and-runner.yml @@ -62,6 +62,7 @@ services: user: 0:0 command: >- bash -ec ' + sleep 15 ; while : ; do forgejo-runner create-runner-file --connect --instance http://forgejo:3000 --name runner --secret {SHARED_SECRET} && break ; sleep 1 ; @@ -89,5 +90,6 @@ services: - docker_certs:/certs command: >- bash -c ' + sleep 15 ; while : ; do test -w .runner && forgejo-runner --config config.yml daemon ; sleep 1 ; done '