Files
archived-gitea-ai-assistant/docs/getting-started.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.3 KiB
Raw Permalink Blame History

快速开始

环境要求

  • Bun >= 1.2.5
  • 可访问的 Gitea 实例
  • 至少一个 LLM 提供商凭证

安装

git clone https://github.com/user/gitea-ai-assistant.git
cd gitea-ai-assistant
bun install

在仓库根目录执行 bun install 会通过 postinstall 自动安装 frontend 依赖。

如果你的环境禁用了生命周期脚本:

bun run bootstrap

最小环境变量

创建 .env 文件:

PORT=5174
ENCRYPTION_KEY= # 必填,使用 openssl rand -hex 32 生成
# DATABASE_PATH=./data/assistant.db
# LOG_LEVEL=info   # 本地开发默认;生产环境请使用 LOG_LEVEL=error

ENCRYPTION_KEY 为必填项,缺失时服务会拒绝启动。

启动服务

bun run dev
# 或
bun run start

首次登录

  • 访问 http://your-server:5174
  • 首次启动默认管理员密码为 password
  • 登录后请立即修改管理员密码

Webhook 配置

方式 A管理后台推荐

在仓库列表点击启用按钮,由系统自动配置 webhook。

方式 B手动配置

在 Gitea 仓库设置中配置:

  • URLhttp://your-server:5174/webhook/gitea
  • Content Typeapplication/json
  • Secret与管理后台中的 Webhook Secret 保持一致
  • 事件Pull Request + Status

健康检查

可通过 /api/health 查看服务状态。