feat(setup): mount production init SQL and use env var for healthcheck

This commit is contained in:
Jason Staack
2026-03-14 09:58:44 -05:00
parent 4885d14a1d
commit 934d630eb0

View File

@@ -2,6 +2,16 @@
# Usage: docker compose -f docker-compose.yml -f docker-compose.prod.yml --env-file .env.prod up -d
services:
postgres:
volumes:
- ./docker-data/postgres:/var/lib/postgresql/data
- ./scripts/init-postgres-prod.sql:/docker-entrypoint-initdb.d/init.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d ${POSTGRES_DB:-tod}"]
interval: 5s
timeout: 5s
retries: 5
api:
build:
context: .