Skip to content

Commit

Permalink
⚙️ Adds healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
jefftriplett committed Mar 2, 2024
1 parent 5c99465 commit 7290d7c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ x-common-settings: &common-settings
dockerfile: ./Dockerfile
target: release
depends_on:
- db
db:
condition: service_healthy
environment:
- "ALLOWED_HOSTS=*"
- "DATABASE_URL=postgres://postgres@db/postgres"
- "DJANGO_DEBUG=true"
restart: on-failure
volumes:
- .:/src:cache

Expand All @@ -17,6 +19,11 @@ services:
db:
environment:
- "POSTGRES_HOST_AUTH_METHOD=trust"
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "postgres"]
interval: 10s
timeout: 3s
retries: 3
image: "pgautoupgrade/pgautoupgrade:latest"
init: true
volumes:
Expand Down

0 comments on commit 7290d7c

Please sign in to comment.