Skip to content

Scheduling infrastructure for absolutely everyone.

Add postgres healthcheck to assure is ready (#1767)

Demian Caldelas4c1b7ef03f55
diff --git a/docker-compose.yml b/docker-compose.yml
index 7e0911264d2..7e1ec1e6e31 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -13,5 +13,15 @@ services:
POSTGRES_DB: "cal-saml"
POSTGRES_PASSWORD: ""
POSTGRES_HOST_AUTH_METHOD: trust
+ healthcheck:
+ test: ["CMD-SHELL", "pg_isready"]
+ interval: 10s
+ timeout: 5s
+ retries: 5
+ postgres_is_ready:
+ image: postgres
+ depends_on:
+ postgres:
+ condition: service_healthy
volumes:
db_data: