Skip to content

Commit 83a0278

Browse files
committed
feat: add health-checks for the infra services
1 parent e163155 commit 83a0278

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

docker-compose.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,27 @@ services:
1010
- 5432:5432
1111
volumes:
1212
- visionBoard_data:/var/lib/postgresql/data
13+
healthcheck:
14+
test: ["CMD-SHELL", "pg_isready -U visionBoard -d dashboard"]
15+
interval: 10s
16+
timeout: 5s
17+
retries: 5
18+
start_period: 10s
1319

1420
adminer:
1521
image: adminer
1622
restart: always
1723
depends_on:
18-
- db
24+
db:
25+
condition: service_healthy
1926
ports:
2027
- 8080:8080
28+
healthcheck:
29+
test: ["CMD", "sh", "-c", "wget -q --spider http://localhost:8080/ || exit 0"]
30+
interval: 10s
31+
timeout: 5s
32+
retries: 3
33+
start_period: 5s
2134

2235
schema-dump:
2336
image: postgres:17.2

0 commit comments

Comments
 (0)