49f88a2cd8
向导 init-db 后立即同步 nexus-state 卷;entrypoint 跳过不完整 env 并在启动前 source /app/.env,避免缺 DATABASE_URL 与无密码 REDIS_URL 导致容器崩溃。 Co-authored-by: Cursor <cursoragent@cursor.com>
1.2 KiB
1.2 KiB
2026-06-06 — 安装向导:1Panel Docker 进程守护
摘要
1Panel + Docker 部署路径下,安装向导步骤 5 展示 Docker/Compose 守护清单(替代 Supervisor/venv/Nginx 裸机清单);init-db 调用 _configure_docker_guardian 检测容器 health 与 1Panel 网络。
动机
- 1Panel 生产使用
docker-compose.prod.yml,进程守护由 restart + healthcheck 负责,容器内写 Supervisor 配置无意义且易误导。 - 步骤 5 原清单面向宝塔/裸机,与 1Panel 运维路径不符。
涉及文件
server/api/install.py—_configure_docker_guardian、_configure_guardian分支、docker_mode响应字段web/app/install.html— 步骤 1 准备项、步骤 5 1Panel 清单(OpenResty/nx update)docs/project/nexus-1panel-operations-knowledge.md— §3.5 守护说明tests/test_security_unit.py— Docker 守护分支测试
迁移 / 重启
无 schema 变更。部署后 bash deploy/sync-install-wizard-to-container.sh 或 nx update。
验证
.venv/bin/pytest tests/test_security_unit.py -k configure_guardian
浏览器完成向导步骤 5,确认显示「1Panel 后续配置」而非 Supervisor 清单。