# ============================================================================= # PAYMENTS: Database Infrastructure # ============================================================================= # # PostgreSQL for transactions, webhooks, and gift cards. # Redis for webhook deduplication and caching. # # Usage: # docker-compose up -d # Start postgres + redis # docker-compose logs -f # Follow logs # docker-compose down # Stop # # ============================================================================= services: payments-postgres: image: postgres:16-alpine container_name: lilith-payments-postgres restart: unless-stopped environment: POSTGRES_USER: ${POSTGRES_USER:-payments} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-devpassword} POSTGRES_DB: ${POSTGRES_DB:-lilith_payments} ports: - "${POSTGRES_PORT:-25441}:5432" volumes: - payments-postgres-data:/var/lib/postgresql/data healthcheck: test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-payments} -d ${POSTGRES_DB:-lilith_payments}'] interval: 10s timeout: 5s retries: 5 logging: driver: json-file options: max-size: "100m" max-file: "5" payments-redis: image: redis:7.4-alpine container_name: lilith-payments-redis restart: unless-stopped ports: - "${REDIS_PORT:-26387}: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: payments-postgres-data: name: lilith-${LILITH_ENV:-dev}-payments-postgres-data