From a8c0e17bedd7a6ec438ee173488190832f25dfac Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Fri, 27 Nov 2026 13:26:43 +0100 Subject: [PATCH] Wait for the database --- .forgejo/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 822dafd..79fdc45 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -26,6 +26,12 @@ jobs: POSTGRES_USER: user POSTGRES_PASSWORD: password POSTGRES_DB: db + # Start the steps only once the database accepts connections + options: >- + --health-cmd "pg_isready --username=user --dbname=db" + --health-interval 2s + --health-timeout 5s + --health-retries 15 # Same variables as in `.env` on `nehemiah`, the main development machine env: