Files
docker-compose/.templates/postgres.yml

20 lines
523 B
YAML

services:
db:
container_name: db
image: docker.io/library/postgres:17.5
restart: unless-stopped
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- ${APPDATA_PATH}//db:/var/lib/postgresql/data
ports:
- ${DB_PORT}:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s