baacdb0252
避免 nx update 因 install.html 已移除而误报失败。 Co-authored-by: Cursor <cursoragent@cursor.com>
1.3 KiB
1.3 KiB
安装完成后归档 install.html
| 项 | 内容 |
|---|---|
| 日期 | 2026-06-06 |
| 动机 | 已安装环境仍可访问 /app/install.html 并展示「系统已安装」,应物理移除向导页 |
变更摘要
install.py:_finalize_install_lock()将web/app/install.html重命名为install.html.bak。entrypoint.sh:检测到安装锁时启动阶段归档(防止镜像重建恢复向导页)。sync-install-wizard-to-container.sh:已锁定/已归档时不再覆盖install.html,验收改为期望 HTTP 404。nexus-1panel.sh:升级与健康检查在已安装时期望install.html→ HTTP 404。
涉及文件
server/api/install.pydocker/entrypoint.shdeploy/sync-install-wizard-to-container.shdeploy/nexus-1panel.shtests/test_security_unit.py
迁移 / 重启
- 需重建 Nexus 镜像(entrypoint)并重启容器。
- 已安装实例:
nx update后set_install_complete/ entrypoint 自动归档;或手动mv install.html install.html.bak。
验证
pytest tests/test_security_unit.py -k archive_install -q
curl -s -o /dev/null -w "%{http_code}\n" https://api.synaglobal.vip/app/install.html # 404
docker exec nexus-prod-nexus-1 test -f /app/web/app/install.html.bak