docs(project): add production-ready documentation

Add a top-level README plus production configuration, API, and rollout documentation. Also align deployment and runbook docs with the current runtime semantics, ports, and daily pipeline entrypoints.
This commit is contained in:
phamnazage-jpg
2026-05-14 19:55:12 +08:00
parent a8999abcb0
commit dd58c18fe3
7 changed files with 759 additions and 10 deletions

View File

@@ -1,8 +1,14 @@
# LLM Intelligence Hub - 部署指南
> 版本: v1.0
> 日期: 2026-05-10
> 适用版本: Phase 1
> 版本: v1.1
> 日期: 2026-05-14
> 适用版本: Phase 3 / Phase 5
相关文档:
- `README.md`:项目入口与常用命令
- `docs/CONFIGURATION.md`:环境变量与运行语义
- `docs/PRODUCTION_CHECKLIST.md`:上线前检查、发布与回滚
---
@@ -60,7 +66,11 @@ npm run dev
### 6. 配置定时任务
```bash
crontab -e
# 添加: 0 8 * * * cd /path/to/llm-intelligence && bash scripts/run_daily.sh
# 正式日报调度
0 8 * * * cd /path/to/llm-intelligence && bash scripts/run_daily.sh >> /tmp/llm_hub_cron.log 2>&1
# 真实采集 + 写库 + 报告生成的手动复跑入口
cd /path/to/llm-intelligence && bash scripts/run_real_pipeline.sh
```
---
@@ -84,7 +94,7 @@ docker-compose up -d
| DATABASE_URL | ✅ | PostgreSQL 连接串 |
| OPENROUTER_API_KEY | ✅ | OpenRouter API Key |
| FEISHU_WEBHOOK | ❌ | 飞书告警 Webhook |
| API_PORT | ❌ | 默认 8080 |
| PORT | ❌ | API Server 监听端口,默认 8080 |
---
@@ -95,10 +105,14 @@ docker-compose up -d
curl http://localhost:8080/health
# 采集器测试
go run scripts/fetch_openrouter.go
go run scripts/fetch_openrouter.go -strict-real
# 日报生成
go run scripts/generate_daily_report.go
# 运行门禁
bash scripts/verify_phase3.sh
bash scripts/verify_phase5.sh
```
---
@@ -112,7 +126,13 @@ go run scripts/generate_daily_report.go
检查 Node.js 版本 >= 20npm 版本 >= 10。
### Q: 采集器返回模拟数据?
未提供 OPENROUTER_API_KEY 时使用模拟数据,提供 Key 后获取真实数据
`fetch_openrouter.go` 在非严格模式下会降级到模拟数据;正式调度和真实流水线默认要求 `OPENROUTER_API_KEY`、真实写库成功,并会把 `run_kind / trigger_source / is_official_daily` 写入运行审计
### Q: 历史重建如何执行?
```bash
bash scripts/rebuild_historical_report.sh 2025-08-07
```
历史重建只会回填审计语义,不会冒充当天正式定时产出。
---