Skip to content

Commit 1dffda8

Browse files
authored
chore(ci): enhance Docker Compose setup with healthcheck and wait option (#71)
1 parent e8db6b1 commit 1dffda8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ jobs:
4646
4747
- name: Tests
4848
run: |
49-
docker compose -f ./docker/compose.yml up -d
49+
docker compose -f ./docker/compose.yml up -d --wait
5050
npm run test

docker/compose.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ services:
1313
POSTGRES_PASSWORD: postgres
1414
volumes:
1515
- ../db/migrations:/docker-entrypoint-initdb.d
16+
healthcheck:
17+
test: ["CMD", "pg_isready", "-U", "postgres"]
18+
interval: 1s
19+
timeout: 3s
20+
retries: 30

0 commit comments

Comments
 (0)