ddon-server/deploy/postgresql/docker-compose.yml

27 lines
757 B
YAML

version: '3.8'
volumes:
ddon-psql-data:
services:
psql:
container_name: ddon-psql
image: postgres:16-alpine
ports:
- "5432:5432"
restart: no
volumes:
- ddon-psql-data:/var/lib/postgresql/data
# - $PWD/schema_postgres.sql:/docker-entrypoint-initdb.d/schema_postgres.sql:ro
- $PWD/postgresql.conf:/etc/postgresql/postgresql.conf:ro
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
- POSTGRES_DB=postgres
- POSTGRES_INITDB_ARGS=--auth=scram-sha-256 --lc-numeric=en_US.UTF-8
command: postgres -c config_file=/etc/postgresql/postgresql.conf
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "postgres"]
interval: 10s
timeout: 1s
retries: 3