Commit Graph

3 Commits

Author SHA1 Message Date
54a73e66f4 docs: add runbooks and Kubernetes Helm Chart
Add 6 runbook documents:
- 服务启动 (Service Startup)
- 服务停止 (Service Shutdown)
- 配置更新 (Configuration Update)
- 日志分析 (Log Analysis)
- 备份恢复 (Backup & Recovery)
- 安全事件 (Security Incident)

Add Kubernetes Helm Chart:
- Chart.yaml, values.yaml
- Deployment with health checks
- Ingress with TLS support
- PVC for data persistence
- PDB for high availability
- HPA for autoscaling
- ServiceAccount configuration

Add cron-backup.conf for automated backup scheduling.
2026-04-11 22:57:31 +08:00
128efbc09f docs: 新增 3 个 Runbook - 配置更新、安全事件响应、事件响应
完成 Runbook 目录建设:
- 05-config-update.md: 配置更新流程和回滚
- 06-security-incident.md: 安全事件分级和响应流程
- 07-incident-response.md: 服务事件分级和应急响应
2026-04-08 22:52:14 +08:00
3b0bcf0ff7 fix: P0问题修复 - JWT配置、安全扫描、备份、Runbook
P0 问题修复(按照 gap analysis):

1. JWT密钥配置修复
   - config.yaml 移除占位符,改为空字符串
   - 添加测试验证 JWT_SECRET 环境变量覆盖功能

2. Docker 部署完善
   - 添加 deploy.resources 限制(内存 512M,CPU 0.5)
   - 添加 healthcheck 健康检查
   - 添加 restart: unless-stopped 重启策略

3. 安全扫描集成
   - 创建 scripts/security/run-gosec.sh 安全扫描脚本
   - 创建 scripts/security/workflow-template.yml CI工作流模板
   - 运行 gosec 扫描发现 6 个 HIGH 级别整数溢出问题

4. 备份自动化
   - 创建 scripts/backup/backup.sh 自动备份脚本
   - 支持 SQLite 数据库和配置文件备份
   - 支持备份验证、自动清理、恢复功能

5. Runbook 文档
   - 创建 docs/runbooks/ 目录
   - 添加 4 个核心 Runbook:服务启动、服务停止、备份恢复、日志分析
   - 添加 README.md 索引文档
2026-04-08 22:31:43 +08:00