26 lines
529 B
YAML
26 lines
529 B
YAML
version: "3.9"
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16
|
|
container_name: postgres-db
|
|
restart: unless-stopped
|
|
|
|
environment:
|
|
POSTGRES_DB: auctiondb
|
|
POSTGRES_USER: auction
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
|
|
ports:
|
|
- "5432:5432" # LAN only, safe inside 192.168.1.x
|
|
|
|
volumes:
|
|
- ./data:/var/lib/postgresql/data
|
|
- ./backup:/backup
|
|
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U auction -d auctiondb"]
|
|
interval: 5s
|
|
timeout: 2s
|
|
retries: 10
|