Skip to content

Commit

Permalink
fix port
Browse files Browse the repository at this point in the history
  • Loading branch information
djeck1432 committed Nov 28, 2024
1 parent 4199a87 commit 404c2e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/dashboard_app_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
env:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5433:5432
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
Expand Down Expand Up @@ -43,17 +43,21 @@ jobs:
run: |
cp .env.dev .env
sed -i 's/DB_HOST=db/DB_HOST=127.0.0.1/' .env
sed -i 's/DB_PORT=5432/DB_PORT=5433/' .env # Update DB_PORT to match the exposed port
sed -i 's/DB_PORT=5432/DB_PORT=5432/' .env # Update DB_PORT to match the exposed port
- name: Wait for Database to be Ready
run: |
for i in {1..30}; do
pg_isready -h 127.0.0.1 -p 5433 -U postgres && break || sleep 2;
pg_isready -h 127.0.0.1 -p 5432 -U postgres && break || sleep 2;
done
- name: Verify PostgreSQL Port is Open
run: |
nc -zv 127.0.0.1 5432
- name: Create Test Database
run: |
PGPASSWORD=postgres psql -h 127.0.0.1 -p 5433 -U postgres -c "CREATE DATABASE dashboard_app;"
PGPASSWORD=postgres psql -h 127.0.0.1 -p 5432 -U postgres -c "CREATE DATABASE dashboard_app;"
- name: Run Tests for Dashboard_App
working-directory: ./apps/dashboard_app
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard_app/.env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ DB_USER=postgres
DB_PASSWORD=postgres
DB_NAME=dashboard_app
DB_HOST=db
DB_PORT=5433
DB_PORT=5432

DATA_HANDLER_URL=http://localhost:5000

0 comments on commit 404c2e6

Please sign in to comment.