From a6fb28dc3cb8a6297299011ead8218e49444263a Mon Sep 17 00:00:00 2001
From: zhizhijie <zhizhijie@users.noreply.gitee.com>
Date: 星期日, 27 九月 2026 09:34:11 +0800
Subject: [PATCH] chore(打包): 一键打包脚本(含 jar 去密自检) + 打包模板入库 deploy-templates + 密钥更新脚本;清理含密钥的旧部署包与压缩件
---
docs/打包部署说明.md | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git "a/docs/\346\211\223\345\214\205\351\203\250\347\275\262\350\257\264\346\230\216.md" "b/docs/\346\211\223\345\214\205\351\203\250\347\275\262\350\257\264\346\230\216.md"
index 05c977c..9535176 100644
--- "a/docs/\346\211\223\345\214\205\351\203\250\347\275\262\350\257\264\346\230\216.md"
+++ "b/docs/\346\211\223\345\214\205\351\203\250\347\275\262\350\257\264\346\230\216.md"
@@ -255,6 +255,30 @@
python -c "import zipfile;print(zipfile.ZipFile('traffic-audit-server/target/traffic-audit-server-1.0.0-SNAPSHOT.jar').read('BOOT-INF/classes/application.yml').decode('utf-8'))" | Select-String "password:|api-key:"
```
+
+### 涓�閿墦鍖咃紙鎺ㄨ崘锛�2026-09-27 璧凤級
+
+```powershell
+powershell -NoProfile -ExecutionPolicy Bypass -File pack-deploy.ps1
+# 鍙�夊弬鏁帮細 -OutRoot "E:\璇曢獙" -SkipFrontend
+```
+
+鑴氭湰鍋氬洓浠朵簨锛�
+1. `mvn clean package -DskipTests` 鏋勫缓鍚庣 jar锛�
+2. **瑙e帇 jar 鑷**锛氭鏌� `BOOT-INF/classes/application.yml` 鏄惁鍏ㄤ负鍗犱綅绗︹�斺�斾竴鏃﹀彂鐜� `sk-` 鎴栨槑鏂囧彛浠�**鐩存帴涓鎵撳寘**锛�
+3. `npm run build` 閲嶅缓鍓嶇 `dist`锛�
+4. 鎸� `deploy-templates/` 缁勮瀹屾暣閮ㄧ讲鍖咃紙backend / frontend / db / README-閮ㄧ讲璇存槑.txt锛夛紝杈撳嚭鍒� `<OutRoot>\traffic-audit-deploy-<yyyyMMdd>`銆�
+
+妯℃澘浠剁粺涓�鏀惧湪 **`deploy-templates/`**锛堝凡鍏ュ簱锛夛細澶栭儴 `application.yml`銆乣start-backend.cmd/.sh`銆乣nginx.conf.example`銆乣db\{init.sql,sql_city_bus,sql_city_taxi,sql_wyc}.sql`銆乣README-閮ㄧ讲璇存槑.txt`銆傛敼妯℃澘鍗虫敼鎵撳寘浜х墿銆�
+
+### 杞崲瀵嗛挜鍚庡悓姝ユ湰鏈�
+
+```powershell
+powershell -NoProfile -ExecutionPolicy Bypass -File set-secrets.ps1
+```
+
+浜や簰寮忚緭鍏ワ紙鍥炶溅璺宠繃鏌愪竴椤癸級锛岃嚜鍔� `setx` 鍒扮敤鎴风幆澧冨彉閲忓苟鎻愮ず閲嶅惎鍚庣锛涘�间笉浼氬啓鍏ヤ换浣曟枃浠躲��
+
### 閮ㄧ讲鏈轰笂鍔�/鎹� DeepSeek key
1. 鎵撳寘涓婁紶鍚庯紝缂栬緫 **jar 鍚岀骇**鐨� `backend/application.yml`锛歚deepseek.api-key: "浣犵殑鏂発ey"`锛堢暀绌哄垯椤甸潰 AI 鍒嗘瀽涓嶅彲鐢紝鍏朵綑鍔熻兘姝e父锛夛紱
--
Gitblit v1.9.1