platform-deployments/docker/features/payments/docker-compose.yml
2026-01-31 17:14:54 -08:00

69 lines
2 KiB
YAML

version: '3.8'
# =============================================================================
# PAYMENTS FEATURE INFRASTRUCTURE
# =============================================================================
#
# Payment processing infrastructure:
# - PostgreSQL: Transactions, subscriptions, gift cards, webhooks
# - Redis: Webhook deduplication, caching
#
# =============================================================================
services:
payments-postgres:
image: postgres:16-alpine
container_name: lilith-payments-postgres
restart: unless-stopped
ports:
- '${PAYMENTS_POSTGRES_PORT:-25440}:5432'
environment:
POSTGRES_USER: ${PAYMENTS_POSTGRES_USER:-lilith}
POSTGRES_PASSWORD: ${PAYMENTS_POSTGRES_PASSWORD:-payments_dev_password}
POSTGRES_DB: ${PAYMENTS_POSTGRES_DB:-lilith_payments}
volumes:
- payments-postgres-data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/01-init.sql:ro
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${PAYMENTS_POSTGRES_USER:-lilith}']
interval: 10s
timeout: 5s
retries: 5
networks:
- payments-network
payments-redis:
image: redis:7.4-alpine
container_name: lilith-payments-redis
restart: unless-stopped
ports:
- '${PAYMENTS_REDIS_PORT:-26387}:6379'
environment:
REDIS_PASSWORD: ${PAYMENTS_REDIS_PASSWORD:-payments_dev_password}
volumes:
- payments-redis-data:/data
command:
- redis-server
- --requirepass
- "${PAYMENTS_REDIS_PASSWORD:-payments_dev_password}"
- --appendonly
- "yes"
- --maxmemory
- "${PAYMENTS_REDIS_MAX_MEMORY:-256MB}"
- --maxmemory-policy
- "noeviction"
healthcheck:
test: ['CMD', 'redis-cli', '-a', '${PAYMENTS_REDIS_PASSWORD:-payments_dev_password}', 'ping']
interval: 10s
timeout: 3s
retries: 5
networks:
- payments-network
volumes:
payments-postgres-data:
payments-redis-data:
networks:
payments-network:
driver: bridge