From e7633beecc48d6f6dfa58107bfa5691e8ef43648 Mon Sep 17 00:00:00 2001 From: Matias Garcia Isaia Date: Wed, 6 Mar 2024 15:09:42 -0300 Subject: [PATCH] WIP - Test connectivty inside Docker Compose --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d0b858e7..8d9a7e7f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,10 +11,10 @@ jobs: - name: Test internal connectivity run: | docker compose up --wait db - PGPASSWORD="${POSTGRES_PASSWORD}" psql --host db --username planwise --list || true - 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 compose run --rm db -e PGPASSWORD="${POSTGRES_PASSWORD}" psql --host db --username planwise --list || true + timeout 60s sh -c "while ! nc -z $(docker inspect planwise-db-1 | jq -r '.[0].NetworkSettings.Networks.planwise_default.IPAddress') 5432; do sleep 1; done" || true docker inspect planwise-db-1 - PGPASSWORD="${POSTGRES_PASSWORD}" psql --host db --username planwise --list || true + docker compose run --rm db -e PGPASSWORD="${POSTGRES_PASSWORD}" psql --host db --username planwise --list || true exit 1 - name: Set environment up