# Optional local infra: Redis + RabbitMQ (same ports as backend/.env defaults).
# Use when running Django / agent_runtime on the host instead of the all-in-one image.
#
#   docker compose up -d
#
# The main app image (Dockerfile) already runs Redis and RabbitMQ via supervisord inside
# the container; this file is for split setups or extra brokers during development.

services:
  redis:
    image: redis:7-alpine
    ports:
      - "6379:6379"
    command: ["redis-server", "--appendonly", "yes"]
    volumes:
      - livekit_redis_data:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 5s
      timeout: 3s
      retries: 5

  rabbitmq:
    image: rabbitmq:3.13-management-alpine
    ports:
      - "5672:5672"
      - "15672:15672"
    environment:
      RABBITMQ_DEFAULT_USER: guest
      RABBITMQ_DEFAULT_PASS: guest
    volumes:
      - livekit_rabbitmq_data:/var/lib/rabbitmq
    healthcheck:
      test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
      interval: 10s
      timeout: 8s
      retries: 6
      start_period: 25s

volumes:
  livekit_redis_data:
  livekit_rabbitmq_data:
