b25d0798f6
Upgrade was skipping 1panel-network detection; wizard now overrides stale host.docker.internal from volume/API defaults. Co-authored-by: Cursor <cursoragent@cursor.com>
1023 B
1023 B
2026-06-05 — 修复 nx update 未同步 1Panel 容器名
摘要
用户步骤 3 仍填 host.docker.internal:cmd_upgrade 未调用 sync_1panel_service_hosts,容器环境变量与向导预填未更新。升级路径补 sync;探测改读 1panel-network;写入 web/data/1panel-hosts.json 作后备;向导加载时覆盖陈旧主机名。
根因
compose_up(安装)会 sync,cmd_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.html—refreshDockerDefaults覆盖陈旧主机
验证
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