28 lines
657 B
YAML
28 lines
657 B
YAML
name: pvz
|
|
|
|
services:
|
|
db:
|
|
image: postgres:16
|
|
container_name: pvz-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: pvz
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-mysecretpassword}
|
|
TZ: Europe/Moscow
|
|
PGTZ: Europe/Moscow
|
|
ports:
|
|
- "${PVZ_DB_PORT:-55432}:5432"
|
|
volumes:
|
|
- pvz_pgdata:/var/lib/postgresql/data
|
|
- ./pvz_database.sql:/docker-entrypoint-initdb.d/01_pvz_database.sql:ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d pvz"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 12
|
|
start_period: 10s
|
|
|
|
volumes:
|
|
pvz_pgdata:
|