From 9ee5c8a7085acbcb91e3dad161b42dd0c7a454b0 Mon Sep 17 00:00:00 2001 From: Nexus Agent Date: Sat, 6 Jun 2026 23:25:44 +0800 Subject: [PATCH] =?UTF-8?q?docs(project):=20nx=20=E4=B8=8A=E5=B8=9D?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E5=B7=A1=E6=A3=80=20round1=E2=80=9310=20?= =?UTF-8?q?=E5=BD=92=E6=A1=A3=E6=80=BB=E7=BB=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增 nexus-god-menu-audit-summary.md 汇总巡检交付与日常速查,并链入文档索引。 Co-authored-by: Cursor --- deploy/README-1panel.md | 3 +- docs/README.md | 1 + ...06-06-nx-god-menu-audit-round10-summary.md | 29 ++++ .../nexus-1panel-operations-knowledge.md | 2 +- docs/project/nexus-god-menu-audit-summary.md | 144 ++++++++++++++++++ 5 files changed, 177 insertions(+), 2 deletions(-) create mode 100644 docs/changelog/2026-06-06-nx-god-menu-audit-round10-summary.md create mode 100644 docs/project/nexus-god-menu-audit-summary.md diff --git a/deploy/README-1panel.md b/deploy/README-1panel.md index 98642763..c627b635 100644 --- a/deploy/README-1panel.md +++ b/deploy/README-1panel.md @@ -1,6 +1,7 @@ # 1Panel + Docker 一键部署 -> 完整知识文档:[docs/project/nexus-1panel-operations-knowledge.md](../docs/project/nexus-1panel-operations-knowledge.md) +> 完整知识文档:[docs/project/nexus-1panel-operations-knowledge.md](../docs/project/nexus-1panel-operations-knowledge.md) +> 巡检归档(2026-06-06):[docs/project/nexus-god-menu-audit-summary.md](../docs/project/nexus-god-menu-audit-summary.md) ## 脚本速查(公共仓库 · 无需令牌) diff --git a/docs/README.md b/docs/README.md index 122a3f83..b6aa0ec8 100644 --- a/docs/README.md +++ b/docs/README.md @@ -19,6 +19,7 @@ | [project/alert-push-policy.md](project/alert-push-policy.md) | 告警策略 | | [project/deploy.md](project/deploy.md) | 部署补充(宝塔/裸机) | | [project/nexus-1panel-operations-knowledge.md](project/nexus-1panel-operations-knowledge.md) | **1Panel + Docker 运维知识 SSOT** | +| [project/nexus-god-menu-audit-summary.md](project/nexus-god-menu-audit-summary.md) | **nx 上帝菜单巡检归档**(2026-06-06 round1–10) | | [project/production-verification-checklist.md](project/production-verification-checklist.md) | L5 清单 | 根目录 [AGENTS.md](../AGENTS.md) · [CLAUDE.md](../CLAUDE.md) · [.cursorrules](../.cursorrules) 为薄入口。 diff --git a/docs/changelog/2026-06-06-nx-god-menu-audit-round10-summary.md b/docs/changelog/2026-06-06-nx-god-menu-audit-round10-summary.md new file mode 100644 index 00000000..78c39193 --- /dev/null +++ b/docs/changelog/2026-06-06-nx-god-menu-audit-round10-summary.md @@ -0,0 +1,29 @@ +# nx 上帝菜单巡检第十轮 — 归档总结文档 + +| 项 | 内容 | +|----|------| +| 日期 | 2026-06-06 | +| 动机 | round4–9 分散在多份 changelog,需单一归档入口供接续 Agent / 运维查阅 | + +## 变更摘要 + +1. **nexus-god-menu-audit-summary.md**(新):round1–10 一览、nx 能力矩阵、三层守护、日常速查、验收标准、changelog 索引。 +2. **docs/README.md**:活跃 SSOT 表增加归档链接。 +3. **deploy/README-1panel.md**:指向归档总结。 + +## 涉及文件 + +- `docs/project/nexus-god-menu-audit-summary.md` +- `docs/README.md` +- `deploy/README-1panel.md` + +## 验证 + +```bash +test -f docs/project/nexus-god-menu-audit-summary.md +grep god-menu-audit-summary docs/README.md deploy/README-1panel.md +``` + +## 迁移 / 重启 + +无。 diff --git a/docs/project/nexus-1panel-operations-knowledge.md b/docs/project/nexus-1panel-operations-knowledge.md index 7b53cc07..f873bfba 100644 --- a/docs/project/nexus-1panel-operations-knowledge.md +++ b/docs/project/nexus-1panel-operations-knowledge.md @@ -5,7 +5,7 @@ | 版本 | 2026-06-06(round9 同步 god-menu 巡检 round4–8) | | 读者 | 运维、接续开发、AI Agent | | 定位 | **1Panel 生产部署 SSOT**(安装向导、网络、MySQL/Redis、日常 nx update) | -| 关联 | [deploy/README-1panel.md](../../deploy/README-1panel.md) · [nexus-functional-development-guide.md](nexus-functional-development-guide.md) · [2026-06-04-1panel-docker-production.md](../design/plans/2026-06-04-1panel-docker-production.md) | +| 关联 | [deploy/README-1panel.md](../../deploy/README-1panel.md) · [nexus-god-menu-audit-summary.md](nexus-god-menu-audit-summary.md) · [nexus-functional-development-guide.md](nexus-functional-development-guide.md) · [2026-06-04-1panel-docker-production.md](../design/plans/2026-06-04-1panel-docker-production.md) | --- diff --git a/docs/project/nexus-god-menu-audit-summary.md b/docs/project/nexus-god-menu-audit-summary.md new file mode 100644 index 00000000..24817a5f --- /dev/null +++ b/docs/project/nexus-god-menu-audit-summary.md @@ -0,0 +1,144 @@ +# Nexus — `nx` 上帝菜单巡检归档(2026-06-06) + +| 项 | 内容 | +|----|------| +| 日期 | 2026-06-06 | +| 范围 | `deploy/nx`、`nexus-1panel.sh`、`update.sh`、安装向导、1Panel Docker 生产 | +| 生产 | `azureuser@20.24.218.235` · `/opt/nexus` · `https://api.synaglobal.vip` | +| 关联 SSOT | [nexus-1panel-operations-knowledge.md](nexus-1panel-operations-knowledge.md) · [deploy/README-1panel.md](../../deploy/README-1panel.md) | + +--- + +## 1. 背景 + +2026-06-06 对 **1Panel + Docker 生产** 路径做连续巡检:修复 502、安装锁、网络、备份、cron、部署脚本分流、镜像与文档漂移。本文档为 **round1–10 归档索引**;细节见各轮 `docs/changelog/2026-06-06-nx-god-menu-audit-round*.md`。 + +--- + +## 2. 巡检轮次一览 + +| 轮次 | 提交(代表) | 主题 | 关键交付 | +|------|-------------|------|----------| +| 预修 | `107b089` `dd66d99` | 502 / 安装锁 / 1panel-network | 锁持久化、`verify_nexus_1panel_network`、nx 菜单修补 | +| 归档 | `58bdf82` | install.html 锁定归档 | `install.html` → `.bak`,外网 404 | +| R2 | `687e059` | 全新安装 vs 卷冲突 | `FRESH_INSTALL` 清卷、验收 404 预期、回滚网络 | +| R3 | `61b8d7d` | health_monitor Docker | `docker restart`、端口/Telegram 从容器读 | +| R4 | `4e1347b`–`ba69bc3` | MySQL 备份 + cron | `mysql_dump_to_file.sh`、`install_ops_cron.sh`、`nx cron` | +| R5 | `89865ec` | 部署运行时分流 | `detect_deploy_runtime.sh`、`upgrade.sh` Docker 委托 | +| R6 | `c9e0879` | 守护配置对齐 | `host_deploy_root`、验收 cron/备份检查 | +| R7 | `e5d4822` | 向导 UI | Layer 3 cron 步骤、guardian 分色 | +| R8 | `72e46ce` | 镜像验收 | `check_container_image_features`、升级后 `nx verify` | +| R9 | `fb9dbcb` | 运维文档 | README + 知识文档同步 round4–8 | +| R10 | — | 本文档 | 归档索引 + 日常速查 | + +--- + +## 3. 当前 `nx` 能力矩阵 + +| 入口 | 用途 | +|------|------| +| `nx` / 菜单 | 安装、更新、重启、日志、备份、cron、验收 | +| `nx update` | `git pull` + MySQL 备份 + 重建镜像 + 健康检查 +(TTY)cron 提示 + 验收 | +| `nx verify` | `verify-1panel-install-wizard.sh` | +| `nx cron` | `install_ops_cron.sh`(health_monitor + db_backup) | +| `nx health` | 状态 + `/health` | +| `bash deploy/upgrade.sh` | 自动识别 Docker → `nexus-1panel.sh upgrade` | + +### 菜单项(已安装) + +| 键 | 功能 | +|----|------| +| `[3]` | 状态 / health / install.html 归档 | +| `[4]` | 一键更新 ★ | +| `[5]`–`[8]` | 重启 / 日志 / Compose / 重建 | +| `[9]` | 立即 MySQL 备份 | +| `[e]` | 安装 cron | +| `[v]` | 验收脚本 | + +--- + +## 4. 三层守护(Docker 生产) + +``` +Layer 1 Compose restart + healthcheck (容器内) +Layer 2 Python self_monitor(30s) (容器内) +Layer 3 health_monitor.sh(cron,宿主机) → docker restart + Telegram + db_backup.sh(cron 03:00) → /var/backups/nexus/ +``` + +**Layer 3 必须在宿主机安装**:`sudo nx cron`(容器内无法写 crontab)。 + +--- + +## 5. 日常运维速查 + +```bash +cd /opt/nexus + +# 更新(推荐) +sudo nx update + +# 验收(已安装应全 PASS,install.html → 404) +sudo nx verify + +# 手动备份 +sudo bash deploy/db_backup.sh + +# 查看 cron +sudo crontab -l | grep nexus + +# 外网健康 +curl -sk https://api.synaglobal.vip/health +``` + +### 升级选项 + +| 标志 | 含义 | +|------|------| +| `--no-backup` | 跳过 MySQL 备份 | +| `--no-cache` | 无缓存重建(Dockerfile/entrypoint 变更后) | +| `--require-backup` | 备份失败则中止 | +| `--check` | 仅查 Git | + +--- + +## 6. 生产验收标准(已安装) + +`sudo nx verify` 关键项: + +- `/health` → `ok` +- `/app/install.html` → **HTTP 404**(已归档) +- Nexus 在 `1panel-network` +- Crontab 含 `nexus-health-monitor` / `nexus-mysql-backup` +- 容器 `install.py` 含 `_host_deploy_root` +- `NEXUS_HOST_ROOT=/opt/nexus` +- HTTPS `/health` → `ok` + +--- + +## 7. 已知限制与后续 + +| 项 | 说明 | +|----|------| +| Supervisor 裸机 | `upgrade.sh` 保留 Supervisor 路径;1Panel 生产以 Docker 为准 | +| 安装向导 UI | 改动在镜像内,需 `nx update` 重建后生效 | +| 前端 14 页 | 本次巡检未改 SPA;见 `reports/audit-frontend-14p-*` | +| 凭据轮询 | 并行功能见 `credential-polling-pending-servers` changelog | + +--- + +## 8. Changelog 索引(本轮系列) + +- [round2](../changelog/2026-06-06-nx-god-menu-audit-round2.md) +- [round3 health_monitor](../changelog/2026-06-06-nx-god-menu-audit-round3-health-monitor.md) +- [round4 mysql/cron](../changelog/2026-06-06-nx-god-menu-audit-round4-mysql-backup-cron.md) +- [round5 runtime](../changelog/2026-06-06-nx-god-menu-audit-round5-deploy-runtime-detect.md) +- [round6 guardian](../changelog/2026-06-06-nx-god-menu-audit-round6-guardian-verify-cron.md) +- [round7 wizard UI](../changelog/2026-06-06-nx-god-menu-audit-round7-install-wizard-cron-prompt.md) +- [round8 image verify](../changelog/2026-06-06-nx-god-menu-audit-round8-image-verify-upgrade.md) +- [round9 docs](../changelog/2026-06-06-nx-god-menu-audit-round9-ops-docs.md) +- [round10 summary](../changelog/2026-06-06-nx-god-menu-audit-round10-summary.md) + +--- + +*巡检由 Agent 执行并留证;用户终验见 [2026-06-01-final-acceptance-checklist.md](2026-06-01-final-acceptance-checklist.md)。*