18 lines
384 B
YAML
18 lines
384 B
YAML
services:
|
|
postgres:
|
|
image: postgres:15
|
|
environment:
|
|
POSTGRES_USER: user
|
|
POSTGRES_PASSWORD: password
|
|
POSTGRES_DB: db
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- /tmp/pg:/var/lib/postgresql/data
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U user -d db"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|