feat(setup): mount production init SQL and use env var for healthcheck
This commit is contained in:
@@ -2,6 +2,16 @@
|
|||||||
# Usage: docker compose -f docker-compose.yml -f docker-compose.prod.yml --env-file .env.prod up -d
|
# Usage: docker compose -f docker-compose.yml -f docker-compose.prod.yml --env-file .env.prod up -d
|
||||||
|
|
||||||
services:
|
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:
|
api:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
|||||||
Reference in New Issue
Block a user