From f48e0947cb9d80d00b182c7cf3da4a20307b87df Mon Sep 17 00:00:00 2001 From: augushong Date: Sun, 26 Jul 2026 09:53:45 +0800 Subject: [PATCH] =?UTF-8?q?docs(timer):=20=E6=8A=80=E8=83=BD=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E8=A1=A5=E5=85=85=20Docker=20=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=90=AF=E5=8A=A8=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增 Docker 部署章节:server 模式自动启动 timer(nohup + --local --quiet),多节点天然隔离(runtime/node_id.lock 独立)。 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- .agents/skills/ulthon-timer/SKILL.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.agents/skills/ulthon-timer/SKILL.md b/.agents/skills/ulthon-timer/SKILL.md index a864090..8c4d242 100644 --- a/.agents/skills/ulthon-timer/SKILL.md +++ b/.agents/skills/ulthon-timer/SKILL.md @@ -187,6 +187,20 @@ return [ - 只跑一轮(便于验证):`php think timer --temp` - 无任务时不输出“no request”:`php think timer --quiet` +### Docker 模式(自动启动) + +使用框架内置的 Docker 部署模式(`docker compose up` / `docker run ... server`)时,定时器会**自动启动**,无需手动运行 `php think timer`。 + +容器启动脚本(`source/stack//source/docker/run.sh`)在 server 模式下会执行: + +```bash +nohup php /var/www/html/think timer --local --quiet & +``` + +即 timer 进程与 web 服务(nginx + php-fpm)在同一容器内并行运行,`--quiet` 抑制 "no request" 输出。 + +多节点部署:每个容器各自启动 timer 进程,`runtime/node_id.lock` 在各自容器内独立生成(天然隔离),连同一个数据库即自动组成多节点集群。 + ### 本地调试(指定请求 Host) site 任务会按站点域名发起请求,默认从 `sysconfig('site','site_domain')` 读取。