platform-codebase/features/email/docker-compose.yml
2026-02-01 18:36:39 -08:00

66 lines
1.6 KiB
YAML

# =============================================================================
# EMAIL: Database Infrastructure
# =============================================================================
#
# PostgreSQL for email logs, addresses, and preferences.
# Redis for BullMQ queues (async email sending).
#
# Usage:
# docker-compose up -d # Start postgres + redis
# docker-compose logs -f # Follow logs
# docker-compose down # Stop
#
# =============================================================================
services:
email-postgres:
image: postgres:16-alpine
container_name: lilith-email-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-email}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-devpassword}
POSTGRES_DB: ${POSTGRES_DB:-lilith_email}
ports:
- "${POSTGRES_PORT:-25439}:5432"
volumes:
- email-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-email} -d ${POSTGRES_DB:-lilith_email}']
interval: 10s
timeout: 5s
retries: 5
logging:
driver: json-file
options:
max-size: "100m"
max-file: "5"
email-redis:
image: redis:7.4-alpine
container_name: lilith-email-redis
restart: unless-stopped
ports:
- "${REDIS_PORT:-26385}:6379"
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 10s
timeout: 5s
retries: 5
logging:
driver: json-file
options:
max-size: "100m"
max-file: "5"
volumes:
email-postgres-data:
name: lilith-${LILITH_ENV:-dev}-email-postgres-data