-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
62 lines (54 loc) · 2.05 KB
/
Copy path.env.example
File metadata and controls
62 lines (54 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# OKMS Production Environment Configuration Template
# Copy this file to .env and fill in real values
# NEVER commit the actual .env file to version control
# Application
APP_NAME=Knowledge Management System
APP_VERSION=1.0.0
ENVIRONMENT=production
DEBUG=false
LOG_LEVEL=INFO
# Server
HOST=0.0.0.0
PORT=8000
WORKERS=4
CORS_ORIGINS=http://localhost:3000
# Database — generate password with: openssl rand -hex 16
DB_NAME=knowledge_production
DB_USER=knowledge_prod_user
DB_PASSWORD=CHANGE_ME_generate_with_openssl_rand_hex_16
DB_HOST=postgres
DB_PORT=5432
DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}
# Redis — generate password with: openssl rand -hex 16
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=CHANGE_ME_generate_with_openssl_rand_hex_16
REDIS_URL=redis://:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/0
# ChromaDB
CHROMA_HOST=chromadb
CHROMA_PORT=8000
CHROMA_COLLECTION_NAME=knowledge_base
# Security — generate with: python -c "import secrets; print(secrets.token_hex(32))"
SECRET_KEY=CHANGE_ME_generate_with_python_secrets_token_hex_32
JWT_ALGORITHM=HS256
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=30
# ── LLM Configuration ──────────────────────────────────────────
# 运行 scripts/setup.sh 可以交互式配置以下项目
#
# LLM_PROVIDER 可选值及对应 BASE_URL:
# openai → https://api.openai.com/v1 (默认模型: gpt-4o-mini)
# deepseek → https://api.deepseek.com (默认模型: deepseek-chat)
# grok → https://api.x.ai/v1 (默认模型: grok-2-latest)
# ollama → http://localhost:11434/v1 (本地,无需 API Key)
# azure → https://<resource>.openai.azure.com (需填 BASE_URL)
#
# 不配置 LLM_API_KEY 时系统自动降级为模板模式,功能正常但无 AI 回答。
LLM_PROVIDER=openai
LLM_API_KEY=
LLM_BASE_URL=
LLM_MODEL=
LLM_TEMPERATURE=0.1
LLM_MAX_TOKENS=2048
LLM_TIMEOUT=30.0
# Monitoring (optional)
GRAFANA_PASSWORD=CHANGE_ME_generate_with_openssl_rand_hex_16