66 lines
1.5 KiB
YAML
66 lines
1.5 KiB
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: estate-platform-db
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: estate
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U estate -d estate"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 20
|
|
networks:
|
|
default:
|
|
aliases:
|
|
- postgres
|
|
|
|
# mailhog:
|
|
# image: mailhog/mailhog
|
|
# ports:
|
|
# - "8025:8025"
|
|
# - "1025:1025"
|
|
|
|
web:
|
|
build: .
|
|
container_name: estate-platform-app
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
pgbouncer:
|
|
condition: service_started
|
|
environment:
|
|
DATABASE_URL: ${DATABASE_URL:-postgresql://postgres:postgres@pgbouncer:6432/estate?pgbouncer=true&connection_limit=10&pool_timeout=0}
|
|
EMAIL_PROVIDER: smtp
|
|
SMTP_HOST: mailhog
|
|
SMTP_PORT: 1025
|
|
EMAIL_FROM: "Estate Planning <no-reply@example.com>"
|
|
JWT_SECRET: "change-me-in-prod"
|
|
APP_BASE_URL: "http://localhost:3000"
|
|
volumes:
|
|
- appdata:/app/data
|
|
restart: unless-stopped
|
|
|
|
pgbouncer:
|
|
image: pgbouncer/pgbouncer:latest
|
|
ports:
|
|
- "6432:6432"
|
|
volumes:
|
|
- ./docker/pgbouncer.ini:/etc/pgbouncer/pgbouncer.ini:ro
|
|
- ./docker/pgbouncer-userlist.txt:/etc/pgbouncer/userlist.txt:ro
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
pgdata:
|
|
appdata:
|