客服推送处理+后台操作
This commit is contained in:
1 parent
b652132957
commit
a81c637a98
11 files changed
+302
-54
No files matched your search
+6
-5
@@ -1,6 +1,6 @@
|
||||
# 一键部署脚本
|
||||
|
||||
在本机运行一条命令,自动完成「打包源码 → 上传服务器 → 构建 → 重启进程」。
|
||||
在本机运行一条命令,自动完成「本地构建(可选)→ 打包 → 上传服务器 → 重启进程」。
|
||||
|
||||
服务器上**不需要安装任何东西**,它复用的就是你已经能用的 SSH。
|
||||
|
||||
@@ -82,7 +82,7 @@ type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh root@你的服务器 "mkdir -p ~
|
||||
=== yelaymaths_api (server API) ===
|
||||
[1/5] Building locally: pnpm prisma:generate && pnpm build
|
||||
[2/5] Packing yelaymaths_api
|
||||
100.8 KB (src, prisma, tools, package.json, ...)
|
||||
160 KB (dist, prisma, package.json, pnpm-lock.yaml, pnpm-workspace.yaml)
|
||||
[3/5] Uploading to /www/wwwroot/yelaymaths/yelaymaths_api/api
|
||||
[4/5] Running on server
|
||||
__DEPLOY_DONE__
|
||||
@@ -121,10 +121,11 @@ All done in 12.0s
|
||||
脚本用的是**白名单**,只有列在 `DeployPaths` 里的路径会被打包。所以这些东西**结构上不可能**被传上去:
|
||||
|
||||
- `.env` / `.env.local`(服务器上的配置不会被覆盖)
|
||||
- `node_modules/`(依赖在服务器上装)
|
||||
- `dist/`、`.next/`(构建产物在服务器上生成)
|
||||
- `node_modules/`
|
||||
- 白名单之外的源码目录
|
||||
|
||||
服务端实际约 100 KB,管理端约 25 KB。
|
||||
Windows 版配置(`deploy.config.ps1`)已经在**本机构建、只传产物**:服务端传 `dist` + `prisma`(约 160 KB),
|
||||
管理端传 `.next` + `next.config.ts`(约 540 KB,73 MB 的构建缓存已排除),服务器不再执行编译,部署完自动重启并探活。
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user