添加 basePath 配置,不然非根目录情况,无法访问
parent
2e2ceaf38b
commit
8e7d72ce71
|
@ -65,7 +65,7 @@ if (APP_TYPE === 'site') {
|
||||||
export default {
|
export default {
|
||||||
// add for transfer to umi
|
// add for transfer to umi
|
||||||
base: basePath,
|
base: basePath,
|
||||||
// publicPath: basePath,
|
publicPath: basePath,
|
||||||
plugins,
|
plugins,
|
||||||
define: {
|
define: {
|
||||||
APP_TYPE: APP_TYPE || '',
|
APP_TYPE: APP_TYPE || '',
|
||||||
|
|
|
@ -28,17 +28,19 @@ npm run build:admin-web
|
||||||
cp -rf dist app/server
|
cp -rf dist app/server
|
||||||
|
|
||||||
# 复制文件到 project 目录执行
|
# 复制文件到 project 目录执行
|
||||||
|
|
||||||
if [ ! -d "/work2/project/admin-web/server/dist" ]; then
|
if [ ! -d "/work2/project/admin-web/server/dist" ]; then
|
||||||
|
mkdir -pv /work2/project/admin-web/server/dist
|
||||||
|
else
|
||||||
rm -rf /work2/project/admin-web/server/dist
|
rm -rf /work2/project/admin-web/server/dist
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
cp -rf app/server /work2/project/admin-web
|
cp -rf app/server /work2/project/admin-web
|
||||||
|
|
||||||
# 安装 server 依赖项
|
# 安装 server 依赖项
|
||||||
cd /work2/project/admin-web/server
|
cd /work2/project/admin-web/server
|
||||||
|
|
||||||
cnpm install
|
npm install
|
||||||
|
|
||||||
# 启动服务
|
# 启动服务
|
||||||
pm2 restart pm2.json
|
pm2 restart pm2.json
|
||||||
|
|
Loading…
Reference in New Issue