mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-08-30 12:45:32 +08:00
docs(timer): 技能文档补充 Docker 模式自动启动说明
新增 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 <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -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/<mode>/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')` 读取。
|
||||
|
||||
Reference in New Issue
Block a user