Skip to content

Commit

Permalink
WIP - Test connectivty inside Docker Compose
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasgarciaisaia committed Mar 6, 2024
1 parent 94b7503 commit 5881688
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -e PGPASSWORD="${POSTGRES_PASSWORD}" db 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 -e PGPASSWORD="${POSTGRES_PASSWORD}" db psql --host db --username planwise --list || true
exit 1
- name: Set environment up
Expand Down

0 comments on commit 5881688

Please sign in to comment.