This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# 方案 C — 预构建镜像部署(服务器不编译)
## 一、上传
1. 镜像/yubao-app-image.tar → 服务器 /home/project/yubao/deploy/yubao-app-image.tar
2. 部署/deploy/ 内全部 → 服务器 /home/project/yubao/deploy/(覆盖同名脚本)
3. 数据库/(若尚未导入)→ 宝塔导入 email_forecast.sql 到 yubao 库
## 二、服务器首次启动
```bash
cd /home/project/yubao
chmod +x deploy/install-prebuilt-image.sh
bash deploy/install-prebuilt-image.sh
```
## 三、后续更新(只换镜像)
开发机重新 pack-prebuilt-upload.ps1,上传新 tar 后:
bash deploy/update-prebuilt-image.sh deploy/yubao-app-image.tar
## 访问
http://192.168.2.14:30327/login
服务器运行时内存约 1~1.5GB,无需在服务器上编译 Next.js。