Files
huangzd1997 a36a60f151 task-181(静态资源部署与 Nginx History 托管): 确认后台 dist 发布目录约定
补充 deploy/release-structure.md 与 verify-dist.mjs,契约测试锁 conf。

TDD: task-181.test.ts 8 用例 RED→GREEN。
2026-09-05 18:09:04 +08:00

21 lines
715 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.
# Admin Vue 发布目录结构(module 10
发布目标:
```text
/var/www/
├── admin-vue-<ts>/ # 新版本临时发布目录
│ ├── index.html
│ └── assets/...
├── admin-vue-prev/ # 上一版本(回滚保留)
└── admin-vue -> admin-vue-<ts> # Nginx 根目录符号链接(原子切换)
```
发布过程:
1. `npm ci && npm run build` 产出 `dist/`
2. 运行 `deploy/verify-dist.mjs`:校验 `index.html` 引用完整、assets 存在、base 为 `/admin-vue/`
3. 上传 `dist/``admin-vue-<ts>/`
4. `ln -sfn admin-vue-<ts> /var/www/admin-vue` 原子切换。
5. 旧版本目录保留为 `admin-vue-prev`,用于快速回滚。