platform-codebase/features/streaming/docker-compose.yml
2026-02-27 14:22:51 -08:00

66 lines
1.7 KiB
YAML

# =============================================================================
# STREAMING: Database Infrastructure
# =============================================================================
#
# PostgreSQL for sessions, tips, goals, notes, chatbot config.
# Redis for WebSocket adapter, chatbot rate limiting, session cache.
#
# Usage:
# docker-compose up -d # Start postgres + redis
# docker-compose logs -f # Follow logs
# docker-compose down # Stop
#
# =============================================================================
services:
streaming-postgres:
image: postgres:16-alpine
container_name: lilith-streaming-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-streaming}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-devpassword}
POSTGRES_DB: ${POSTGRES_DB:-lilith_streaming}
ports:
- "${POSTGRES_PORT:-25468}:5432"
volumes:
- streaming-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-streaming} -d ${POSTGRES_DB:-lilith_streaming}']
interval: 10s
timeout: 5s
retries: 5
logging:
driver: json-file
options:
max-size: "100m"
max-file: "5"
streaming-redis:
image: redis:7.4-alpine
container_name: lilith-streaming-redis
restart: unless-stopped
ports:
- "${REDIS_PORT:-26398}: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:
streaming-postgres-data:
name: lilith-${LILITH_ENV:-dev}-streaming-postgres-data