26 lines
642 B
YAML
26 lines
642 B
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: mado-postgres
|
|
restart: unless-stopped
|
|
ports:
|
|
- "127.0.0.1:${POSTGRES_PORT:-5435}:5432"
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-mado}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-mado_secret}
|
|
POSTGRES_DB: ${POSTGRES_DB:-mado_motor}
|
|
volumes:
|
|
- mado_postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"pg_isready -U ${POSTGRES_USER:-mado} -d ${POSTGRES_DB:-mado_motor}",
|
|
]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
volumes:
|
|
mado_postgres_data:
|