24 lines
668 B
YAML
24 lines
668 B
YAML
|
|
services:
|
||
|
|
postgres:
|
||
|
|
image: postgres:16-alpine
|
||
|
|
container_name: mimic-postgres
|
||
|
|
restart: unless-stopped
|
||
|
|
environment:
|
||
|
|
POSTGRES_DB: ${POSTGRES_DB:-mimic}
|
||
|
|
POSTGRES_USER: ${POSTGRES_USER:-mimic_app}
|
||
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-mimic_dev_password}
|
||
|
|
ports:
|
||
|
|
- "127.0.0.1:5432:5432"
|
||
|
|
volumes:
|
||
|
|
- mimic_pgdata:/var/lib/postgresql/data
|
||
|
|
- ./scripts/postgres-init:/docker-entrypoint-initdb.d:ro
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-mimic_app} -d ${POSTGRES_DB:-mimic}"]
|
||
|
|
interval: 5s
|
||
|
|
timeout: 3s
|
||
|
|
retries: 10
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
mimic_pgdata:
|
||
|
|
name: mimic_pgdata
|