Commit e148564f authored by chenqikuai's avatar chenqikuai

docs: 添加部署文档,部署脚本

parent a2a435d4
......@@ -9,7 +9,55 @@
[gitlab](https://gitlab.33.cn/chenqikuai/fns_front_2)
# 打包部署
## 普通打包
npm run build
## 提供ios app审核的打包
npm run buildReview
\ No newline at end of file
## 提供 ios app 审核的打包
npm run buildReview
```conf
server {
listen 2048;
charset utf-8;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript application/javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_disable "MSIE [1-6]\.";
location / {
root /usr/share/nginx/html/fns_front;
try_files $uri $uri /index.html;
}
location /proxyApi/ {
proxy_pass http://172.16.102.150:8091/;
# proxy_pass https://www.puhuijr.net/proxyApi/;
}
location /proxyWs {
rewrite ^/proxyWs/(.*) /$1 break;
proxy_pass http://172.16.101.107:8888;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
location ~ /clear(/.*) {
allow 192.168.0.0/24;
auth_basic "Secret";
auth_basic_user_file /etc/nginx/conf.d/passwd;
proxy_cache_purge cache_nginx $host$1$is_args$args;
}
}
```
tar -czf fns_front.tar fns_front
scp fns_front.tar yx@172.16.101.129:/usr/share/nginx/html/fns_front.tar
rm -rf fns_front.tar
ssh yx@172.16.101.129 'cd /usr/share/nginx/html && rm -rf fns_front && tar -xzf fns_front.tar && rm -rf fns_front.tar'
echo '👉 http://172.16.101.129:2048/'
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment