58 lines
1.1 KiB
Markdown
58 lines
1.1 KiB
Markdown
### 本地运行
|
||
```
|
||
npm config set registry https://registry.npmmirror.com/
|
||
npm install
|
||
npm run dev
|
||
|
||
|
||
npm install babel-plugin-component -D --legacy-peer-deps
|
||
```
|
||
### 打包
|
||
```
|
||
npm install
|
||
npm run build:prod
|
||
编译结果:admin-ui/dist目录
|
||
```
|
||
|
||
npm cache clean --force
|
||
|
||
|
||
rm -rf node_modules
|
||
rm package-lock.json # 或者 rm yarn.lock
|
||
npm install
|
||
|
||
|
||
npm install --legacy-peer-deps
|
||
|
||
|
||
npm install --loglevel verbose
|
||
|
||
server {
|
||
listen 80;
|
||
server_name localhost;
|
||
charset utf-8;
|
||
|
||
location / {
|
||
root /opt/web/;
|
||
try_files $uri $uri/ /index.html;
|
||
index index.html index.htm;
|
||
}
|
||
|
||
location /prod-api/ {
|
||
proxy_set_header Host $http_host;
|
||
proxy_set_header X-Real-IP $remote_addr;
|
||
proxy_set_header REMOTE-HOST $remote_addr;
|
||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
proxy_pass http://210.45.128.61:9095/;
|
||
}
|
||
|
||
# springdoc proxy
|
||
location ~ ^/v3/api-docs/(.*) {
|
||
proxy_pass http://localhost:8080/v3/api-docs/$1;
|
||
}
|
||
|
||
error_page 500 502 503 504 /50x.html;
|
||
location = /50x.html {
|
||
root html;
|
||
}
|
||
} |