# ============================================================================
# LightRAG Multi-Tenant Stack - Quick Start Environment
# 
# IMPORTANT: Copy this file to .env and update values marked with [REQUIRED]
# cp env.example .env
# ============================================================================

# ============================================================================
# TESTING MODE CONFIGURATION (MULTI-TENANT ENABLED BY DEFAULT)
# ============================================================================
# Choose testing mode:
#   off   = Single-tenant compatibility mode (like main branch)
#   on    = Multi-tenant mode with single default tenant
#   demo  = Multi-tenant mode with 2 pre-configured tenants ★ DEFAULT ★
#
# IMPORTANT: The default mode is 'demo' which enables multi-tenant testing with:
#   • Tenant 1: 595ea68b-0f3a-4dbe-8a86-9276a1bbd10c (kb-prod, kb-dev)
#   • Tenant 2: 44bf3e0d-d633-4dea-9b74-3e24140cd7e3 (kb-main, kb-backup)
#
# See docs/adr/008-multi-tenant-testing-strategy.md for detailed testing procedures
MULTITENANT_MODE=demo

# For MULTITENANT_MODE=on, create additional KBs (comma-separated)
# Example: kb-default,kb-secondary,kb-experimental
CREATE_DEFAULT_KB=kb-default

# ============================================================================
# [REQUIRED] LLM API KEY - UPDATE THIS!
# ============================================================================

# Option 1: OpenAI (Recommended for quick start)
LLM_BINDING=openai
LLM_MODEL=gpt-4o-mini
LLM_BINDING_API_KEY=[REQUIRED: Get from https://platform.openai.com/api-keys]

# Option 2: Alternative LLM Providers
# Uncomment to use instead of OpenAI

# Azure OpenAI
# LLM_BINDING=azure_openai
# LLM_MODEL=gpt-4o
# LLM_BINDING_HOST=https://your-resource.openai.azure.com/
# LLM_BINDING_API_KEY=your-azure-api-key
# AZURE_OPENAI_API_VERSION=2024-08-01-preview
# AZURE_OPENAI_DEPLOYMENT=gpt-4o

# Ollama (Local)
# LLM_BINDING=ollama
# LLM_MODEL=llama2
# LLM_BINDING_HOST=http://localhost:11434

# ============================================================================
# Server Ports (optional - modify if ports are already in use)
# ============================================================================

PORT=8000
WEBUI_PORT=3001
POSTGRES_PORT=5432
REDIS_PORT=6379

# ============================================================================
# Database Credentials (optional - use defaults for development)
# ============================================================================

POSTGRES_USER=lightrag
POSTGRES_PASSWORD=lightrag_secure_password
POSTGRES_DATABASE=lightrag_multitenant

# ============================================================================
# Embedding Configuration (optional - defaults to Ollama)
# ============================================================================

EMBEDDING_BINDING=ollama
EMBEDDING_MODEL=bge-m3:latest
EMBEDDING_BINDING_HOST=http://localhost:11434

# ============================================================================
# Multi-Tenant Configuration
# ============================================================================

DEFAULT_TENANT=default
DEFAULT_KB=default

# Pre-configured demo tenants (when MULTITENANT_MODE=demo)
# Tenant 1: 595ea68b-0f3a-4dbe-8a86-9276a1bbd10c with kb-prod, kb-dev
# Tenant 2: 44bf3e0d-d633-4dea-9b74-3e24140cd7e3 with kb-main, kb-backup
# (Automatically created by init-demo-tenants.sql)

# ============================================================================
# That's it! You can now run:
# 
# 1. make setup
# 2. make up
# 3. make init-db
# 4. Open http://localhost:3001
# 
# For advanced configuration, see docs/adr/008-multi-tenant-testing-strategy.md
# ============================================================================
