Skip to content

ops: refactor deploy_light into a foreground launcher (#181)#186

Merged
liujuanjuan1984 merged 9 commits intomainfrom
ops/issue-181-deploy-light-clean
Mar 17, 2026
Merged

ops: refactor deploy_light into a foreground launcher (#181)#186
liujuanjuan1984 merged 9 commits intomainfrom
ops/issue-181-deploy-light-clean

Conversation

@liujuanjuan1984
Copy link
Collaborator

@liujuanjuan1984 liujuanjuan1984 commented Mar 17, 2026

变更概览

本 PR 聚焦 #181,将 deploy_light 从带后台管理职责的轻量部署脚本,收敛为单一职责的前台 launcher。

范围边界

  • 本 PR 只处理 deploy_light 的职责收敛,不承载 #145#180 等其它议题。
  • detached 运行、自动重启、日志托管等能力明确交给外部 supervisor(如 nohuppm2systemd)。

模块变更

1. scripts/deploy_light.sh

  • 移除脚本内置的 stop / status / restart 生命周期管理。
  • 移除脚本内置的 PID、日志文件与实例运行目录管理。
  • 保持 start 兼容写法,但默认即以前台阻塞方式启动。
  • 保留 readiness 探测与子进程清理逻辑。
  • 保留环境变量继承与 CLI key=value 覆盖能力。
  • 继续接受 instancelog_rootrun_root 参数,但仅用于向后兼容解析,不再实际使用。

2. scripts/deploy_light_readme.md

  • 将文档更新为 foreground launcher 语义。
  • 明确日志输出到 stdout / stderr。
  • 明确推荐由 nohuppm2systemd 等外部 supervisor 负责 detached 运行、自动重启与日志托管。
  • 移除旧版 supervisor / PID / log 布局说明。

Issue 关系

验证

  • bash -n scripts/deploy_light.sh
  • uv run pre-commit run --all-files
  • uv run pytest

@liujuanjuan1984
Copy link
Collaborator Author

补充修复已推送:

  • 保留前台 launcher 的真实退出码,避免 EXIT trap 吞掉失败状态
  • stop/status/restart 给出明确的不支持提示
  • 启动前显式解析并校验 opencode-a2a-server 入口,提前失败而不是延后到启动阶段

已重新验证:

  • bash -n scripts/deploy_light.sh
  • uv run pre-commit run --all-files
  • uv run pytest

@liujuanjuan1984 liujuanjuan1984 marked this pull request as ready for review March 17, 2026 01:51
@liujuanjuan1984 liujuanjuan1984 merged commit 64bf824 into main Mar 17, 2026
3 checks passed
@liujuanjuan1984 liujuanjuan1984 deleted the ops/issue-181-deploy-light-clean branch March 17, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Priority: High] [Ops] 将 deploy_light 收敛为前台 launcher,并将 nohup/pm2 交给调用方

1 participant