This commit is contained in:
zxr
2026-06-21 18:27:35 +08:00
parent 17063cbad0
commit 2fc6cd3a2d
33 changed files with 19 additions and 2367 deletions

View File

@@ -4,7 +4,7 @@
本文区分本地开发、联调验收和 Linux/麒麟部署三类场景,避免把模板 README 直接作为交付部署手册。
当前仓库尚未初始化 `server/``web/`。后续实际工程创建后,应在对应目录补充更细的运行说明。
当前仓库尚未保留实际 `server/``web/` 工程。后续实际工程创建后,应在对应目录补充更细的运行说明。
## 2. 场景边界
@@ -18,16 +18,16 @@
| 目录 | 职责 | 状态 |
| --- | --- | --- |
| `server/` | 实际后端工程,基于 `templates/server_sample/` 初始化 | 尚未创建 |
| `server/` | 实际后端工程,基于 `templates/server_sample/` 初始化后继续改造 | 尚未创建 |
| `web/` | 实际前端工程,基于 `templates/front_sample/standard` 初始化 | 尚未创建 |
| `deploy/` | 部署、迁移、回滚、烟测说明和配置示例 | 已规划 |
| `deploy/` | 部署、迁移、回滚、烟测说明和配置示例 | 已创建 |
| `docs/` | 需求、架构、验收和测试文档 | 已存在 |
模板目录默认只读,不作为最终交付目录。
## 4. 初始化实际工程
后端初始化:
后端初始化。若在干净仓库中重新初始化,可参考
```powershell
Copy-Item -LiteralPath .\templates\server_sample -Destination .\server -Recurse
@@ -43,7 +43,7 @@ Copy-Item -LiteralPath .\templates\front_sample\standard -Destination .\web -Rec
| 检查项 | 要求 |
| --- | --- |
| 配置示例 | 只提交 `etc/*.example.yaml``.env.example`,不提交真实密码。 |
| 配置示例 | 只提交 `etc/*.example.yaml``*.example.yaml``.env.example`,不提交真实密码。 |
| 目录结构 | 后端延续 `cmd/``internal/config/``internal/logic/``internal/models/``internal/routers/`。 |
| 前端结构 | API 放入 `src/api/`,页面放入 `src/views/`,状态放入 Pinia。 |
| 模板引用 | 业务代码不直接写回 `templates/`。 |
@@ -68,6 +68,8 @@ Set-Location .\server
go run .\cmd\cli\main.go migrate
```
后端重新初始化后,应只提交 `server/etc/*.example.yaml` 或等价 `.example` 配置文件。本地真实配置应复制为 `server/etc/ops_dev.yaml` 等文件后再填写,并在 `server/.gitignore` 中排除。
后端本地配置要求:
| 配置 | 要求 |