Build frontend locally for lightweight deployment
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
# 部署说明
|
||||
|
||||
本项目在本地 Windows 电脑构建,服务器只运行静态成品。
|
||||
|
||||
## 本地更新
|
||||
|
||||
```powershell
|
||||
npm ci
|
||||
npm run build
|
||||
git add .
|
||||
git commit -m "Update bead pattern web"
|
||||
git push
|
||||
```
|
||||
|
||||
`npm run build` 会重新生成 `out/`。提交前必须包含最新的 `out/`。
|
||||
|
||||
## 服务器更新
|
||||
|
||||
```bash
|
||||
cd /projects/pixel-bead-pattern
|
||||
git pull
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
服务器构建只把 `out/` 复制到 Nginx 镜像,不安装 npm 依赖,也不编译网页。
|
||||
Reference in New Issue
Block a user