Files
archived-gitea-ai-assistant/docs/configuration.zh-CN.md
jeffusion 1e7c80ca9f docs: document LOG_LEVEL configuration and production defaults
Update all documentation to reflect new global LOG_LEVEL environment variable.

- Add LOG_LEVEL to configuration reference tables

- Update deployment guides with LOG_LEVEL=error examples

- Clarify dev (info) vs production (error) log level recommendations

- Add LOG_LEVEL to all .env examples and quick start guides

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
2026-03-26 23:50:59 +08:00

1.8 KiB
Raw Permalink Blame History

配置参考

配置模型

项目采用 DB-first 运行时配置模型:

  • .env 仅用于基础设施级引导参数
  • 运行时配置Gitea、Provider、密钥、审查策略、通知由管理后台维护并持久化到 SQLite

环境变量(最小集)

变量 必填 说明 默认值
ENCRYPTION_KEY API Key 加密主密钥AES-256-GCM64 位十六进制) -
PORT 服务端口 5174
DATABASE_PATH SQLite 路径 ./data/assistant.db
LOG_LEVEL 后端日志级别(debug/info/warn/error)。默认 info;生产环境建议 error info

生成密钥:

openssl rand -hex 32

首次启动默认值

当数据库为空时:

  • JWT_SECRET 自动生成
  • WEBHOOK_SECRET 自动生成
  • ADMIN_PASSWORD 默认 password

首次登录后请立即修改管理员密码。

管理后台配置分组

1) Gitea

  • API URL
  • Access Token
  • Admin Token可选

2) 安全

  • Webhook SecretHMAC-SHA256 验签)
  • Admin Password
  • JWT Secret

3) LLM

  • ProviderOpenAI Compatible / OpenAI Responses / Anthropic / Gemini
  • 角色模型planner、specialist、judge、embedding

4) 通知

  • Feishu Webhook 与可选签名密钥
  • WeCom企业微信Webhook

5) 审查

  • 引擎模式:agent / codex
  • Triage 开关
  • 规模阈值(small/medium/large
  • 执行模式(skip/light/full
  • Token 预算与并发限制

规模与模式是两个层次:

  • small/medium/large:变更规模分类
  • skip/light/full:审查执行深度

6) 记忆与学习(可选)

  • ENABLE_MEMORY(默认 false
  • Qdrant URL
  • Reflection / Debate 开关

仅在开启记忆能力时需要 Qdrant。