From 94b7503a97a76c509baf70e9f723bcd182a095e3 Mon Sep 17 00:00:00 2001 From: Matias Garcia Isaia Date: Wed, 6 Mar 2024 15:04:00 -0300 Subject: [PATCH] WIP - Troubleshoot DB connectivity --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4bb1ecc0..d0b858e7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,8 @@ jobs: run: | docker compose up --wait db PGPASSWORD="${POSTGRES_PASSWORD}" psql --host db --username planwise --list || true - sleep 20 + timeout 60s sh -c "while ! nc -z $(docker inspect planwise-db-1 | jq -r '.[0].NetworkSettings.Networks.planwise_default.IPAddress') 3306; do sleep 1; done" || true + docker inspect planwise-db-1 PGPASSWORD="${POSTGRES_PASSWORD}" psql --host db --username planwise --list || true exit 1