services:
  mudabbir:
    build: .
    container_name: mudabbir
    ports:
      - "${MUDABBIR_PORT:-8888}:8888"
    volumes:
      - mudabbir-data:/home/mudabbir/.mudabbir
    env_file:
      - path: .env
        required: false
    restart: unless-stopped

  # Local LLM — start with: docker compose --profile ollama up -d
  ollama:
    image: ollama/ollama:latest
    container_name: mudabbir-ollama
    profiles: [ollama]
    ports:
      - "11434:11434"
    volumes:
      - ollama-data:/root/.ollama
    restart: unless-stopped
    # GPU passthrough (uncomment for NVIDIA):
    # deploy:
    #   resources:
    #     reservations:
    #       devices:
    #         - driver: nvidia
    #           count: all
    #           capabilities: [gpu]

  # Vector DB for mem0 semantic memory — start with: docker compose --profile qdrant up -d
  qdrant:
    image: qdrant/qdrant:latest
    container_name: mudabbir-qdrant
    profiles: [qdrant]
    ports:
      - "6333:6333"
    volumes:
      - qdrant-data:/qdrant/storage
    restart: unless-stopped

volumes:
  mudabbir-data:
  ollama-data:
  qdrant-data:
