25 lines
636 B
YAML
25 lines
636 B
YAML
# Dev-only Postgres matching the default DATABASE_URL in internal/config.
|
|
name: fullstack-backend
|
|
|
|
services:
|
|
db:
|
|
image: postgres:18-alpine
|
|
environment:
|
|
POSTGRES_USER: fullstack
|
|
POSTGRES_PASSWORD: fullstack
|
|
POSTGRES_DB: fullstack
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
# postgres:18+ wants the mount at /var/lib/postgresql (not .../data)
|
|
# so in-place major upgrades via pg_upgrade remain possible.
|
|
- pgdata:/var/lib/postgresql
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U fullstack -d fullstack"]
|
|
interval: 2s
|
|
timeout: 2s
|
|
retries: 15
|
|
|
|
volumes:
|
|
pgdata:
|