version: '3.8'

# BreakPilot LibreChat Frontend
# Startet LibreChat mit Custom Endpoint für vast.ai Mistral-7B

services:
  # LibreChat - Chat Frontend
  librechat:
    image: ghcr.io/danny-avila/librechat-dev:latest
    container_name: breakpilot-chat
    ports:
      - "3080:3080"
    depends_on:
      - mongodb
      - meilisearch
    restart: unless-stopped
    env_file:
      - .env
    volumes:
      - ./librechat.yaml:/app/librechat.yaml:ro
      - ./images:/app/client/public/images
      - librechat_logs:/app/api/logs
    extra_hosts:
      - "host.docker.internal:host-gateway"

  # MongoDB - LibreChat Datenbank
  mongodb:
    image: mongo:7.0
    container_name: breakpilot-mongo
    restart: unless-stopped
    volumes:
      - mongodb_data:/data/db
    command: mongod --noauth

  # Meilisearch - Volltextsuche für Conversations
  meilisearch:
    image: getmeili/meilisearch:v1.7
    container_name: breakpilot-search
    restart: unless-stopped
    environment:
      - MEILI_NO_ANALYTICS=true
      - MEILI_ENV=development
    volumes:
      - meilisearch_data:/meili_data

volumes:
  mongodb_data:
  meilisearch_data:
  librechat_logs:
