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