更新本地部署说明和忽略规则

This commit is contained in:
cat-shark
2026-06-20 10:17:04 +08:00
parent 8922a3eef6
commit b6f30a838f
2 changed files with 38 additions and 5 deletions
+1
View File
@@ -45,6 +45,7 @@ database.db
src/lang/source-use.json src/lang/source-use.json
/data /data
/local-auth-data/
/_delete /_delete
.vscode .vscode
+37 -5
View File
@@ -2,7 +2,7 @@
这是从原目录整理出的独立副本,后续开发、启动和构建请在本目录执行。 这是从原目录整理出的独立副本,后续开发、启动和构建请在本目录执行。
## 启动 ## 启动应用
```bat ```bat
start-local.bat start-local.bat
@@ -14,14 +14,46 @@ start-local.bat
npm.cmd run start:local npm.cmd run start:local
``` ```
默认会同时启动本地认证服务、Vite 和 Electron。
- 认证服务:`http://127.0.0.1:3302`
- 应用认证 API`http://127.0.0.1:3302/api`
- 管理后台:`http://127.0.0.1:3302/admin/`
- 默认账号:`13800138000`
- 默认密码:`123456`
## 单独启动认证/管理服务
```bat
npm.cmd run auth:local
```
管理后台是从遗失代码中恢复的原版纯静态页面,源码位于 `admin-panel/`;服务端代码位于 `server/local-auth/`。当前为了本地测试,认证服务会顺带托管 `admin-panel/`,之后可以把 `admin-panel/` 单独部署到任意静态站点。
独立部署后台时,默认请求同域 `/api`。如果后台和认证服务不在同一个域名,可以通过 `api` 参数指定认证服务地址:
```text
https://admin.example.com/?api=https://auth.example.com
```
本地测试也可以这样写:
```text
http://127.0.0.1:3302/admin/?api=http://127.0.0.1:3302
```
## 自检 ## 自检
```bat ```bat
npm.cmd run start:check npm.cmd run start:check
``` ```
## 说明 ## 系统 API Key 配置
- 默认开发端口已改为 `3354`,避免和原目录的 `3344` 服务冲突。 进入 `http://127.0.0.1:3302/admin/` 后,在“系统配置”里填写:
- 已排除旧目录中的构建产物、日志、缓存、用户数据和 Git 信息。
- `node_modules` 是实拷贝,不是软链接;同时排除了旧 Electron 目录中误混入的巨大运行数据。 - `aliyun_bailian_api_key`QwenTTS / DashScope API Key
- `aliyun_bailian_base_url`:默认 `https://dashscope.aliyuncs.com/compatible-mode/v1`
- 其他 OSS、RunningHub、火山引擎、云美颜配置也可以在这里维护
这些配置会通过 `/api/system/config/public` 提供给本地应用作为兜底配置。