# License key MARIADB_LICENSE_KEY= # LLM Configuration LLM_PROVIDER=gemini LLM_MODEL=gemini-2.5-flash-lite # OLLAMA Configuration #LLM_PROVIDER=ollama #OLLAMA_HOST=http://localhost:11434 # Embedding Configuration EMBEDDING_PROVIDER=gemini embedding_model=gemini-embedding-001 # API Keys GEMINI_API_KEY= #OPENAI_API_KEY= # Database Configuration DB_HOST= DB_PORT=3306 DB_USER= DB_PASSWORD= DB_NAME=rag_db DB_SSL_ENABLED=true # Admin User Configuration ADMIN_EMAIL= ADMIN_PASSWORD= # Security Keys SECRET_KEY= JWT_SECRET_KEY= MCP_AUTH_SECRET_KEY= # Server Ports APP_HOST=127.0.0.1 APP_PORT=8000 MCP_HOST=127.0.0.1 MCP_PORT=8002 MCP_MARIADB_HOST=127.0.0.1 MCP_MARIADB_PORT=3306 # RAG Configuration DOCUMENTS_TABLE=documents_DEMO VDB_TABLE=vdb_tbl_DEMO # Document Paths (for MCP file ingestion) # Files in test_documents/ on host are available at /app/test_documents/ in container MCP_DOCUMENT_BASE_PATH=/app # ============================================================================ # RERANKING CONFIGURATION # ============================================================================ # Enable reranking globally (default: false) RERANKING_ENABLED=true # Default reranking model RERANKING_MODEL_TYPE=flashrank RERANKING_MODEL_NAME=ms-marco-MiniLM-L-12-v2 #RERANKING_API_KEY= # Retrieval strategy: retrieve (top_k * multiplier), then rerank to top_k RERANKING_TOP_K_MULTIPLIER=2.0 RERANKING_DEFAULT_TOP_K=5 # Model caching RERANKING_CACHE_MODELS=true RERANKING_CACHE_MAX_SIZE=3 # Batch processing RERANKING_BATCH_SIZE=32 RERANKING_ENABLE_BATCHING=true # =============================================================================== # FILE STORAGE CONFIGURATION # =============================================================================== # Configure where uploaded files are stored. Supports two backends: # - 'local': Store files on local filesystem (for on-prem deployments) # - 's3': Store files in AWS S3 bucket (for cloud deployments) # # Files are organized in per-user folders for security isolation: # Local: {LOCAL_STORAGE_PATH}/{user_id}/{filename} # S3: s3://{bucket}/{prefix}{user_id}/{filename} # # For Docker deployments with local storage, mount a host volume: # volumes: # - /var/rag-uploads:/app/uploaded_files # =============================================================================== # Storage type: 'local' or 's3' (default: local) FILE_STORAGE_TYPE=local LOCAL_STORAGE_PATH=./uploaded_files # =============================================================================== # S3 STORAGE CONFIGURATION (used when FILE_STORAGE_TYPE=s3) # =============================================================================== #MANAGED_S3_BUCKET= #MANAGED_S3_REGION=us-east-1 #MANAGED_S3_PREFIX= #AWS_ACCESS_KEY_ID= #AWS_SECRET_ACCESS_KEY= #AWS_DEFAULT_REGION=us-east-1 #AWS_CA_BUNDLE= # =============================================================================== # DOCUMENT PROCESSING CONFIGURATION (Layout-Aware Parsers) # =============================================================================== # Available processors (selected at /orchestrate/ingestion endpoint): # - base: Basic text extraction (pdfplumber, python-docx) - always available # - layout_aware_standard: Docling-based Markdown conversion (local processing) # - layout_aware_advanced: LlamaParse cloud API (requires API key below) # --- Layout-Aware Standard (Docling) Server Defaults --- # OCR provider for scanned documents DOCLING_OCR_PROVIDER=rapidocr # Ray cluster address for distributed processing (set to specific address or 'auto') DOCLING_RAY_HEAD_ADDRESS=auto # Docling Ray HTTP service (local dev) DOCLING_RAY_SERVICE_URL=http://localhost:8003 DOCLING_RAY_REQUEST_TIMEOUT=600 # --- Layout-Aware Advanced (LlamaParse) API Key --- # Get your API key from: https://cloud.llamaindex.ai #LLAMA_CLOUD_API_KEY= # ============================================================================= # MCP CONFIGURATION # ============================================================================= MCP_READ_ONLY=false MCP_ENABLE_AUTH=true MCP_ENABLE_VECTOR_TOOLS=true MCP_ENABLE_DATABASE_TOOLS=true MCP_ENABLE_RAG_TOOLS=true MCP_RAG_HEALTHCHECK_ENABLED=true MCP_STANDALONE_MODE=false # ============================================================================ # CELERY CONFIG # ============================================================================ CELERY_ENABLED=true CELERY_AUTOSCALE=8,2 CELERY_POOL=threads CELERY_BROKER_URL=redis://localhost:6379/0 CELERY_RESULT_BACKEND=redis://localhost:6379/0 # Redis Configuration REDIS_URL=redis://localhost:6379/0 # Optional: Celery Worker Settings CELERY_WORKER_CONCURRENCY=4 # Number of worker processes CELERY_WORKER_PREFETCH_MULTIPLIER=4 CELERY_TASK_TIME_LIMIT=3600 # 1 hour hard limit CELERY_TASK_SOFT_TIME_LIMIT=3300 # 55 minutes soft limit # CORS Configuration CORS_ALLOWED_ORIGINS=http://localhost:3000,http://127.0.0.1:3000 CORS_ALLOW_CREDENTIALS=true CORS_ALLOW_METHODS=GET,POST,PUT,DELETE,OPTIONS CORS_ALLOW_HEADERS=Authorization,Content-Type # Development Settings DEBUG_MODE=false LOG_SQL_QUERIES=false MCP_LOG_LEVEL=INFO # ============================================================================= # ENHANCED SECURITY SETTINGS # ============================================================================= # Rate Limiting (requests per minute) RATE_LIMIT_REQUESTS=100 RATE_LIMIT_WINDOW=60 # File Upload Security MAX_FILE_SIZE=200MB ALLOWED_FILE_EXTENSIONS=.pdf,.txt,.docx,.md,.html,.csv,.xml SCAN_UPLOADS_FOR_MALWARE=false QUARANTINE_SUSPICIOUS_FILES=true # Security Headers SECURITY_HEADERS_ENABLED=true # ============================================================================= # QUOTA SETTINGS # ============================================================================= # Max documents per user QUOTA_MAX_DOCUMENTS=100 # Max storage in MB QUOTA_MAX_STORAGE_MB=1000 # Max concurrent ingestion tasks QUOTA_MAX_CONCURRENT_TASKS=10 # Max files per sync operation QUOTA_MAX_FILES_PER_SYNC=10 # Requests per minute QUOTA_RATE_LIMIT_RPM=60