Skip to content

Commit

Permalink
postgres health check
Browse files Browse the repository at this point in the history
  • Loading branch information
talentedmrjones committed Oct 21, 2024
1 parent 433ff3f commit e32f76b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions backend/actions-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ services:
- POSTGRES_PASSWORD
ports:
- ${DB_PORT}:${DB_PORT}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
api:
depends_on:
postgres:
condition: service_healthy
image: ${API_IMAGE_URI}
environment:
- PORT
Expand All @@ -19,8 +27,6 @@ services:
- DB_PASS
- AUTH_HS256_SECRET
- AUTH_HEADER_FIELD
depends_on:
- postgres
ports:
- ${PORT}:${PORT}
command:
Expand Down

0 comments on commit e32f76b

Please sign in to comment.