# ShuDao SafeAI 环境变量配置模板 # 复制此文件为 .env 并填写实际值 # ==================== 数据库配置 ==================== DB_HOST=localhost DB_PORT=3306 DB_USER=root DB_PASSWORD=your_mysql_password_here DB_NAME=shudao # ==================== Redis 配置 ==================== REDIS_HOST=localhost REDIS_PORT=6379 REDIS_PASSWORD= REDIS_DB=0 # ==================== JWT 配置 ==================== JWT_SECRET_KEY=your_jwt_secret_key_here_at_least_32_chars JWT_ALGORITHM=HS256 JWT_EXPIRE_MINUTES=43200 # ==================== API 密钥 ==================== # DeepSeek API DEEPSEEK_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx DEEPSEEK_API_URL=https://api.deepseek.com # Qwen API QWEN_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx QWEN_API_URL=http://your-qwen-server:port # ==================== OSS 配置 ==================== OSS_ENDPOINT=your-oss-endpoint.com OSS_ACCESS_KEY_ID=your_oss_access_key_id OSS_ACCESS_KEY_SECRET=your_oss_access_key_secret OSS_BUCKET_NAME=your_bucket_name # ==================== 外部服务 ==================== # YOLO 识别服务 YOLO_API_URL=http://your-yolo-server:port # ChromaDB 服务 CHROMADB_API_URL=http://your-chromadb-server:port # 意图识别服务 INTENT_API_URL=http://your-intent-server:port # 在线搜索服务 SEARCH_API_URL=http://your-search-server:port # ==================== 应用配置 ==================== APP_ENV=production APP_DEBUG=false APP_HOST=0.0.0.0 APP_PORT=22001 # ==================== 日志配置 ==================== LOG_LEVEL=INFO LOG_DIR=logs # ==================== 安全配置 ==================== # 密码加密密钥(用于数据库密码加密存储) ENCRYPTION_KEY=your_32_byte_encryption_key_here # CORS 允许的源(多个用逗号分隔) CORS_ORIGINS=* # ==================== 其他配置 ==================== # 文件上传大小限制(MB) MAX_UPLOAD_SIZE=10 # 会话超时时间(分钟) SESSION_TIMEOUT=30 # 启用性能监控 ENABLE_METRICS=false # Sentry DSN(可选,用于错误追踪) SENTRY_DSN=