pooint pages
@@ -3,11 +3,15 @@ ENV = 'development'
|
||||
|
||||
# base api
|
||||
# VUE_APP_BASE_API = '/dev-api'
|
||||
VUE_APP_BASE_API = 'http://127.0.0.1:30032'
|
||||
# VUE_APP_BASE_API = 'http://127.0.0.1:30032'
|
||||
# VUE_APP_BASE_API = 'https://jfadmin.suzhouyuqi.com'
|
||||
# VUE_APP_BASE_API = 'http://jfanyueadmin.szxingming.com'
|
||||
# VUE_APP_BASE_API = 'http://jfadmin.wenjinhui.com'
|
||||
# VUE_APP_BASE_API = 'http://jfadmin-bsy.bosenyuan.com'
|
||||
# shjjy153 项目
|
||||
# VUE_APP_BASE_API = 'http://jjy-jfadmin.fwxgpt.com'
|
||||
# shccd159 项目
|
||||
VUE_APP_BASE_API = 'http://ccd-jfadmin.fwxgpt.com'
|
||||
|
||||
|
||||
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
|
||||
@@ -5,9 +5,18 @@ ENV = 'production'
|
||||
# VUE_APP_BASE_API = '/prod-api'
|
||||
# VUE_APP_BASE_API = 'http://127.0.0.1:8080'
|
||||
# VUE_APP_BASE_API = 'https://jf.suzhouyuqi.com'
|
||||
# VUE_APP_BASE_API = 'http://jfadmin.xiashengjun.com'
|
||||
# VUE_APP_BASE_API = 'http://jfadmin.wenjinhui.com'
|
||||
# miao33 项目
|
||||
<<<<<<<< HEAD:backend-adminend/.env.production
|
||||
# VUE_APP_BASE_API = 'http://jfadmin.xiashengjun.com'
|
||||
|
||||
# shjjy153 项目
|
||||
# VUE_APP_BASE_API = 'http://jjy-jfadmin.fwxgpt.com'
|
||||
|
||||
# shccd159 项目
|
||||
VUE_APP_BASE_API = 'http://ccd-jfadmin.fwxgpt.com'
|
||||
========
|
||||
VUE_APP_BASE_API = 'http://jfadmin.xiashengjun.com'
|
||||
# VUE_APP_BASE_API = 'http://jfanyueadmin.szxingming.com'
|
||||
# VUE_APP_BASE_API = 'http://jfadmin-bsy.bosenyuan.com'
|
||||
# miao33 项目
|
||||
VUE_APP_BASE_API = 'http://jfadmin.xiashengjun.com'
|
||||
|
||||
>>>>>>>> origin/main:frontend/.env.production
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
## 二、前端打包
|
||||
|
||||
**打包前请确认**:`frontend/.env.production` 中 **`VUE_APP_BASE_API`** 为本项目接口地址(例如本项目为 `http://jfadmin.xiashengjun.com`)。使用 backend 的部署脚本(`deploy-admin-miao33.sh` / `deploy-admin-by80.sh`)时,会在打包前自动检查该值与 `deploy.conf` 中当前环境的 `VUE_APP_BASE_API_EXPECTED` 是否一致,不一致将拒绝打包并提示修改。
|
||||
|
||||
在 **frontend 目录** 下执行:
|
||||
|
||||
```bash
|
||||
@@ -34,10 +36,15 @@ npm run build:prod
|
||||
|
||||
前端与后端一起发布时,使用 **backend 的一键部署脚本**,会自动完成:前端打包 → 后端打包 → 远程备份 → 上传 jar 与 `dist` → 重启服务。
|
||||
|
||||
在项目 **backend 目录** 下执行:
|
||||
在项目 **backend 目录** 下执行(按环境二选一):
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
|
||||
# miao33 环境(profile=miao33,默认 8.152.170.46 / jfadmin.xiashengjun.com)
|
||||
./shell/deploy-admin-miao33.sh
|
||||
|
||||
# by80 环境(profile=miao80,默认 123.56.214.80 / jfadmin.bosenyuan.com)
|
||||
./shell/deploy-admin-by80.sh
|
||||
```
|
||||
|
||||
@@ -47,7 +54,7 @@ cd backend
|
||||
2. **在 frontend 目录执行 `npm run build:prod`**,生成 `dist`
|
||||
3. 远程备份原有 jar 与后台静态
|
||||
4. 上传 jar 到 `REMOTE_DIR_JAR`,上传 **dist 到 REMOTE_DIR_ADMIN**
|
||||
5. 远程重启 admin 服务(Spring Profile miao80)
|
||||
5. 远程重启 admin 服务(对应 Spring Profile)
|
||||
|
||||
即:**前端无需单独操作,一次执行即可完成前端打包 + 自动部署发布**。
|
||||
SSH 配置、deploy.conf、故障排查见:**[backend/DEPLOY.md](../backend/DEPLOY.md)**。
|
||||
@@ -56,11 +63,11 @@ SSH 配置、deploy.conf、故障排查见:**[backend/DEPLOY.md](../backend/DE
|
||||
|
||||
## 四、部署配置(前端相关)
|
||||
|
||||
配置在 **backend/deploy.conf**,by80 段示例:
|
||||
配置在 **backend/deploy.conf**,按环境分段(miao33、by80、miao50):
|
||||
|
||||
| 配置项 | 说明 | 示例 |
|
||||
|--------|------|------|
|
||||
| **REMOTE_DIR_ADMIN** | 前端 dist 发布目录(admin 后台站点根目录) | `/www/wwwroot/jfadmin.bosenyuan.com` |
|
||||
| 配置项 | 说明 | miao33 示例 | by80 示例 |
|
||||
|--------|------|-------------|-----------|
|
||||
| **REMOTE_DIR_ADMIN** | 前端 dist 发布目录(admin 后台站点根目录) | `/www/wwwroot/jfadmin.xiashengjun.com` | `/www/wwwroot/jfadmin.bosenyuan.com` |
|
||||
|
||||
脚本通过 **tar 管道** 将 `frontend/dist` 内容上传到该目录,不依赖远程安装 rsync。
|
||||
|
||||
@@ -14,6 +14,23 @@ ADMIN_LOCAL_PORT=30032
|
||||
ADMIN_JAR_NAME=miao-admin-2.2.jar
|
||||
|
||||
|
||||
miao33:
|
||||
spring:
|
||||
profiles:
|
||||
active: miao33
|
||||
SERVER_HOST=8.152.170.46
|
||||
SERVER_USER=root
|
||||
SERVER_PORT=22
|
||||
REMOTE_DIR_JAR=/www/wwwroot/crmeb
|
||||
REMOTE_DIR_ADMIN=/www/wwwroot/jfadmin.xiashengjun.com
|
||||
FRONT_LOCAL_PORT=30031
|
||||
FRONT_JAR_NAME=miao-front-2.2.jar
|
||||
ADMIN_LOCAL_PORT=30032
|
||||
ADMIN_JAR_NAME=miao-admin-2.2.jar
|
||||
|
||||
|
||||
|
||||
|
||||
miao50:
|
||||
spring:
|
||||
profiles:
|
||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 354 B After Width: | Height: | Size: 354 B |
|
Before Width: | Height: | Size: 329 B After Width: | Height: | Size: 329 B |
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 331 B |
|
Before Width: | Height: | Size: 342 B After Width: | Height: | Size: 342 B |
|
Before Width: | Height: | Size: 340 B After Width: | Height: | Size: 340 B |
|
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 336 B |
|
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 338 B |
|
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 343 B |
|
Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 321 B |
|
Before Width: | Height: | Size: 323 B After Width: | Height: | Size: 323 B |
|
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 344 B |
|
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 338 B |
|
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 328 B |
|
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 337 B |
|
Before Width: | Height: | Size: 350 B After Width: | Height: | Size: 350 B |
|
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 336 B |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 53 B After Width: | Height: | Size: 53 B |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 152 B After Width: | Height: | Size: 152 B |
|
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |