Add postgres healthcheck to assure is ready (#1767)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
This commit is contained in:
parent
5c0983ef6c
commit
4c1b7ef03f
1 changed files with 10 additions and 0 deletions
|
@ -13,5 +13,15 @@ services:
|
||||||
POSTGRES_DB: "cal-saml"
|
POSTGRES_DB: "cal-saml"
|
||||||
POSTGRES_PASSWORD: ""
|
POSTGRES_PASSWORD: ""
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
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:
|
volumes:
|
||||||
db_data:
|
db_data:
|
||||||
|
|
Loading…
Reference in a new issue