Files
Nexus/docs/changelog/2026-06-05-1panel-hosts-upgrade-sync.md
T
2026-07-08 22:31:31 +08:00

1023 B
Raw Blame History

2026-06-05 — 修复 nx update 未同步 1Panel 容器名

摘要

用户步骤 3 仍填 host.docker.internalcmd_upgrade 未调用 sync_1panel_service_hosts,容器环境变量与向导预填未更新。升级路径补 sync;探测改读 1panel-network;写入 web/data/1panel-hosts.json 作后备;向导加载时覆盖陈旧主机名。

根因

  • compose_up(安装)会 synccmd_upgrade(日常 nx update)之前不会
  • 安装状态/表单可能缓存 host.docker.internal,覆盖 docker_defaults

涉及文件

  • deploy/nexus-1panel.sh — upgrade 调 sync + 写卷
  • deploy/detect-1panel-services.sh — 从 1panel-network 枚举容器
  • server/api/install.py — 读 1panel-hosts.json 后备
  • web/app/install.htmlrefreshDockerDefaults 覆盖陈旧主机

验证

nx update --no-cache
grep 1PANEL docker/.env.prod
docker exec nexus-prod-nexus-1 cat /app/web/data/1panel-hosts.json
# 安装向导步骤 3 db_host 应为 1Panel-mysql-xxxx