Merge pull request 'add healthcheck to db container' (#34) from healthcheck into main

Reviewed-on: #34
This commit is contained in:
Hugh Rundle 2025-10-04 16:57:11 +10:00
commit af8e4b6ca7

View file

@ -2,6 +2,12 @@ services:
db:
image: postgres:13
env_file: .env
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
volumes:
- pgdata:/var/lib/postgresql/data
networks:
@ -15,7 +21,9 @@ services:
volumes:
- .:/app
depends_on:
- db
db:
condition: service_healthy
restart: true
networks:
- main
ports: