-
-
Save MichalAdorno/747e771ddf381746c8f85d812efa5823 to your computer and use it in GitHub Desktop.
docker-compose Postgres health-check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
postgress: | |
.... | |
healthcheck: | |
test: ["CMD-SHELL", "pg_isready -U postgres"] | |
interval: 10s | |
timeout: 5s | |
retries: 5 | |
app: | |
... | |
depends_on: | |
postgres: | |
condition: service_healthy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment