Files
ulthon_admin/.agents/rules/ulthon-deploy-environment.md
augushong c5ebf86ad9 refactor(rules): 精简 AGENTS.md,下沉模块级规则,迁移 skill 为 rule
- tp-controller-url-rules skill 迁移为 rule ulthon-controller-url.md
- AGENTS.md「其他规则」中的 source/ 约定下沉为 ulthon-source-directory.md
- AGENTS.md「其他规则」中的部署栈+命令执行环境下沉为 ulthon-deploy-environment.md
- AGENTS.md 精简:其他规则从 10 条减至 5 条,规则维护机制从 10 行减至 4 行
- ulthon-rules-manager 技能增加 rules/skills 边界判定说明
- rules 定位拓宽:约束、约定、设计决策均可作为 rule
2026-06-01 21:48:27 +08:00

24 lines
1011 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 部署环境与命令执行
> 来源框架内置ulthon-
> 作用域:部署配置、命令执行环境判断
> 触发条件:执行 php think 命令、配置部署模式、切换运行环境时加载
## 部署栈模式
- `source/stack/` 为模式文件统一目录(含 `default/` 与各模式目录)
- `default/` 必须与代码库默认行为一致
- 默认行为相关文件变更时需同步更新 `source/stack/default/` 对应文件
## 运行模式判断
执行 `php think` 命令前,必须先判断当前运行模式。
**判断方式**:检查仓库根目录是否存在 `docker-compose.yaml`
- **存在**Docker 模式。宿主机可能没有 PHP不能依赖 `php think` 来检测。所有 `php think` 命令前缀改为 `docker compose exec ulthon_admin`
- 示例:`docker compose exec ulthon_admin php think tools:http:call`
- **不存在**:宿主机模式。直接执行 `php think`
也可读取 `source/stack/stack.json` 了解所有可用模式及其说明。