Files
Nexus/docs/changelog/2026-06-06-install-html-archive-on-lock.md
T
Nexus Deploy baacdb0252 fix(deploy): 已归档安装向导时 sync 脚本验收期望 404
避免 nx update 因 install.html 已移除而误报失败。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-06 21:31:06 +08:00

1.3 KiB
Raw Blame History

安装完成后归档 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.py
  • docker/entrypoint.sh
  • deploy/sync-install-wizard-to-container.sh
  • deploy/nexus-1panel.sh
  • tests/test_security_unit.py

迁移 / 重启

  • 需重建 Nexus 镜像(entrypoint)并重启容器。
  • 已安装实例:nx updateset_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