Skip to content

Commit 51f9fb6

Browse files
author
Dennis Labordus
committed
Changed the healthy check for PostgreSQL.
Signed-off-by: Dennis Labordus <[email protected]>
1 parent 037963b commit 51f9fb6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

compas/docker-compose-postgresql.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ services:
1616
- POSTGRES_DB=compas
1717
- PGDATA=/var/lib/postgresql/data/compas
1818
healthcheck:
19-
test: ["CMD-SHELL", "pg_isready -U postgres"]
19+
test: ["CMD-SHELL", "sleep 10 && pg_isready -U postgres"]
2020
interval: 5s
2121
timeout: 10s
2222
retries: 10
@@ -58,6 +58,12 @@ services:
5858
- USERINFO_WHO_CLAIMNAME=name
5959
- USERINFO_SESSION_WARNING=20
6060
- USERINFO_SESSION_EXPIRES=30
61+
deploy:
62+
restart_policy:
63+
condition: on-failure
64+
delay: 5s
65+
max_attempts: 3
66+
window: 30s
6167
healthcheck:
6268
test: ["CMD", "curl", "-f", "http://localhost:8080/compas-scl-data-service/q/health/ready"]
6369
interval: 15s

0 commit comments

Comments
 (0)