From b282356e9e5247da16ebe6bf6a6804ad22d47cf4 Mon Sep 17 00:00:00 2001 From: Schallbert Date: Thu, 26 Sep 2024 05:54:54 +0000 Subject: [PATCH] update example for docker-compose to allow fix 502 errors in case Gitea not yet ready on runner startup (#605) Minimalistic approach: Only adds what is needed to fix #600 Context: https://blog.schallbert.de/en/fix-gitea-runner/ Reviewed-on: https://gitea.com/gitea/act_runner/pulls/605 Reviewed-by: Lunny Xiao Reviewed-by: Zettat123 Co-authored-by: Schallbert Co-committed-by: Schallbert --- examples/docker-compose/README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/examples/docker-compose/README.md b/examples/docker-compose/README.md index c696606..a0fd797 100644 --- a/examples/docker-compose/README.md +++ b/examples/docker-compose/README.md @@ -5,12 +5,22 @@ gitea: image: gitea/gitea ... + healthcheck: + # checks availability of Gitea's front-end with curl + test: ["CMD", "curl", "-f", ""] + interval: 10s + retries: 3 + start_period: 30s + timeout: 10s runner: image: gitea/act_runner restart: always depends_on: - - gitea + gitea: + # required so runner can attach to gitea, see "healthcheck" + condition: service_healthy + restart: true volumes: - ./data/act_runner:/data - /var/run/docker.sock:/var/run/docker.sock