# ============================================================================= # DeepWiki Environment Configuration # Copy this file to .env and fill in the values # ============================================================================= # ----------------------------------------------------------------------------- # GitLab OAuth2 SSO (Required) # ----------------------------------------------------------------------------- # Self-hosted GitLab instance URL GITLAB_URL=https://gitlab.yourcompany.com # OAuth Application credentials (Admin > Applications > New Application) # Redirect URI: http://localhost:3000/auth/callback # Scopes: read_user, read_api, read_repository GITLAB_CLIENT_ID= GITLAB_CLIENT_SECRET= # JWT signing key (generate with: openssl rand -hex 32) JWT_SECRET_KEY= # ----------------------------------------------------------------------------- # GitLab Batch Indexing (Required for pre-vectorization) # ----------------------------------------------------------------------------- # Service Account PAT with read access to target groups # (Admin > Service Accounts > Create, then generate PAT with read_api scope) GITLAB_SERVICE_TOKEN= # Comma-separated Group IDs to pre-vectorize GITLAB_BATCH_GROUPS= # Optional: cron expression for scheduled re-indexing (default: disabled) # BATCH_INDEX_SCHEDULE=0 2 * * * # ----------------------------------------------------------------------------- # Admin Access Control # ----------------------------------------------------------------------------- # Comma-separated list of GitLab usernames with admin access to /admin page # ADMIN_USERNAMES=zhangsan,lisi # ----------------------------------------------------------------------------- # Permission Cache # ----------------------------------------------------------------------------- # TTL in seconds for permission cache (default: 300 = 5 minutes) # PERMISSION_CACHE_TTL=300 # ----------------------------------------------------------------------------- # LLM Provider API Keys (at least one required) # ----------------------------------------------------------------------------- OPENAI_API_KEY= GOOGLE_API_KEY= # OPENROUTER_API_KEY= # ----------------------------------------------------------------------------- # AWS Bedrock (optional, for Bedrock models) # ----------------------------------------------------------------------------- # AWS_ACCESS_KEY_ID= # AWS_SECRET_ACCESS_KEY= # AWS_SESSION_TOKEN= # AWS_REGION=us-east-1 # AWS_ROLE_ARN= # ----------------------------------------------------------------------------- # Azure OpenAI (optional) # ----------------------------------------------------------------------------- # AZURE_OPENAI_API_KEY= # AZURE_OPENAI_ENDPOINT= # AZURE_OPENAI_VERSION= # ----------------------------------------------------------------------------- # Ollama (optional, for local models) # ----------------------------------------------------------------------------- # OLLAMA_HOST=http://localhost:11434 # ----------------------------------------------------------------------------- # Embedder Configuration # ----------------------------------------------------------------------------- # Options: openai (default), google, ollama, bedrock # DEEPWIKI_EMBEDDER_TYPE=openai # ----------------------------------------------------------------------------- # Server Configuration # ----------------------------------------------------------------------------- # Backend API port # PORT=8001 # Backend URL for frontend proxy # SERVER_BASE_URL=http://localhost:8001 # Frontend origin for CORS (used in OAuth callback redirect) # FRONTEND_ORIGIN=http://localhost:3000 # Custom config directory path # DEEPWIKI_CONFIG_DIR=api/config/ # ----------------------------------------------------------------------------- # Ask Agent (Deep Agents SDK embedded in the existing FastAPI server) # ----------------------------------------------------------------------------- # GitLab SSO and already-indexed local source clones are required. # Uses the existing model/provider configuration unless overridden here. # AGENT_ENABLED=true # AGENT_PROVIDER=openai # AGENT_MODEL=your-tool-calling-model # OpenAI-compatible proxy, also used by the agent adapter # OPENAI_BASE_URL=https://your-model-proxy/v1 # Storage defaults to ~/.adalflow/agent (covered by the existing Docker volume). # AGENT_DATA_DIR=/root/.adalflow/agent # Run only ONE API worker per agent data directory. # AGENT_MAX_CONCURRENT_RUNS=4 # Maximum waiting analyses; logged-in and public Ask share the same worker pool. # AGENT_MAX_QUEUED_RUNS=32 # Public Ask is disabled until an administrator publishes groups in /admin. # Its settings default to ~/.adalflow/metadata/public_ask.json. # PUBLIC_ASK_SETTINGS_PATH=/root/.adalflow/metadata/public_ask.json # AGENT_RUN_TIMEOUT_SECONDS=900 # Input-context budget used for automatic summarization. Set <= your model's limit. # Current gateway model supports 1,000,000 input tokens; automatic compaction at 85%. # AGENT_CONTEXT_TOKENS=1000000 # Maximum summary output, not an analysis-turn or final-answer limit. # AGENT_SUMMARY_TOKENS=2000 # Summary generation allowance includes reasoning tokens; final summary stays bounded separately. # AGENT_SUMMARY_GENERATION_TOKENS=8192 # ----------------------------------------------------------------------------- # Logging # ----------------------------------------------------------------------------- # LOG_LEVEL=INFO # LOG_FILE_PATH=api/logs/application.log # LOG_MAX_SIZE=10 # LOG_BACKUP_COUNT=5