# Docker Compose for kafka + Valkey
#
# Usage:
#   cp config.example.toml config.toml   # edit as needed
#   docker compose up -d

services:
  kafka:
    build: .
    ports:
      - "8080:8080"
    volumes:
      - ./config.toml:/etc/kafka/config.toml:ro
    depends_on:
      valkey:
        condition: service_healthy
    restart: unless-stopped

  valkey:
    image: valkey/valkey:8
    ports:
      - "6379:6379"
    volumes:
      - valkey-data:/data
    healthcheck:
      test: ["CMD", "valkey-cli", "ping"]
      interval: 5s
      timeout: 3s
      retries: 5
    restart: unless-stopped

volumes:
  valkey-data:
