From 9843e85a8b7e28cc03ec690bd96a9f44c810a711 Mon Sep 17 00:00:00 2001 From: liuchen864 <23082234@qq.com> Date: Sun, 14 Apr 2024 11:55:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=B7=E6=8B=89=E7=8E=AF?= =?UTF-8?q?=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.hella13 | 8 ++++---- .env.hella14 | 8 ++++---- .env.hella15 | 8 ++++---- .env.hella16 | 8 ++++---- .env.hella8 | 8 ++++---- .env.hella9 | 8 ++++---- Dockerfile_hella | 7 +++++++ nginx_hella.conf | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 84 insertions(+), 24 deletions(-) create mode 100644 Dockerfile_hella create mode 100644 nginx_hella.conf diff --git a/.env.hella13 b/.env.hella13 index 545cdb784..9b9e1300c 100644 --- a/.env.hella13 +++ b/.env.hella13 @@ -4,10 +4,10 @@ NODE_ENV=production VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://172.21.32.13:25100/api' +VITE_BASE_URL='http://172.21.32.13/api' # 上传路径 -VITE_UPLOAD_URL='http://172.21.32.13:25100/api/admin-api/infra/file/upload' +VITE_UPLOAD_URL='http://172.21.32.13/api/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH= @@ -31,7 +31,7 @@ VITE_BASE_PATH=/ VITE_OUT_DIR=sfms3.0 # 自定义接口路径 -VITE_INTERFACE_URL='http://172.21.32.13:25100/magic/web/index.html' +VITE_INTERFACE_URL='http://172.21.32.13:90/magic/web/index.html' # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.21.32.13:25100' +VITE_JMREPORT_BASE_URL='http://172.21.32.13:90' diff --git a/.env.hella14 b/.env.hella14 index c1468097e..9e15dcdd5 100644 --- a/.env.hella14 +++ b/.env.hella14 @@ -4,10 +4,10 @@ NODE_ENV=production VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://172.21.32.14:25100/api' +VITE_BASE_URL='http://172.21.32.14/api' # 上传路径 -VITE_UPLOAD_URL='http://172.21.32.14:25100/api/admin-api/infra/file/upload' +VITE_UPLOAD_URL='http://172.21.32.14/api/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH= @@ -31,7 +31,7 @@ VITE_BASE_PATH=/ VITE_OUT_DIR=sfms3.0 # 自定义接口路径 -VITE_INTERFACE_URL='http://172.21.32.14:25100/magic/web/index.html' +VITE_INTERFACE_URL='http://172.21.32.14:90/magic/web/index.html' # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.21.32.14:25100' +VITE_JMREPORT_BASE_URL='http://172.21.32.14:90' diff --git a/.env.hella15 b/.env.hella15 index 126ee2ab6..30eac259b 100644 --- a/.env.hella15 +++ b/.env.hella15 @@ -4,10 +4,10 @@ NODE_ENV=production VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://172.21.32.15:25100/api' +VITE_BASE_URL='http://172.21.32.15/api' # 上传路径 -VITE_UPLOAD_URL='http://172.21.32.15:25100/api/admin-api/infra/file/upload' +VITE_UPLOAD_URL='http://172.21.32.15/api/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH= @@ -31,7 +31,7 @@ VITE_BASE_PATH=/ VITE_OUT_DIR=sfms3.0 # 自定义接口路径 -VITE_INTERFACE_URL='http://172.21.32.15:25100/magic/web/index.html' +VITE_INTERFACE_URL='http://172.21.32.15:90/magic/web/index.html' # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.21.32.15:25100' +VITE_JMREPORT_BASE_URL='http://172.21.32.15:90' diff --git a/.env.hella16 b/.env.hella16 index 24e5bbe9b..459c68a41 100644 --- a/.env.hella16 +++ b/.env.hella16 @@ -4,10 +4,10 @@ NODE_ENV=production VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://172.21.32.16:25100/api' +VITE_BASE_URL='http://172.21.32.16/api' # 上传路径 -VITE_UPLOAD_URL='http://172.21.32.16:25100/api/admin-api/infra/file/upload' +VITE_UPLOAD_URL='http://172.21.32.16/api/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH= @@ -31,7 +31,7 @@ VITE_BASE_PATH=/ VITE_OUT_DIR=sfms3.0 # 自定义接口路径 -VITE_INTERFACE_URL='http://172.21.32.16:25100/magic/web/index.html' +VITE_INTERFACE_URL='http://172.21.32.16:90/magic/web/index.html' # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.21.32.16:25100' +VITE_JMREPORT_BASE_URL='http://172.21.32.16:90' diff --git a/.env.hella8 b/.env.hella8 index d8f9b6184..844c22c0e 100644 --- a/.env.hella8 +++ b/.env.hella8 @@ -4,10 +4,10 @@ NODE_ENV=production VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://172.22.32.8:25100/api' +VITE_BASE_URL='http://172.22.32.8/api' # 上传路径 -VITE_UPLOAD_URL='http://172.22.32.8:25100/api/admin-api/infra/file/upload' +VITE_UPLOAD_URL='http://172.22.32.8/api/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH= @@ -31,7 +31,7 @@ VITE_BASE_PATH=/ VITE_OUT_DIR=sfms3.0 # 自定义接口路径 -VITE_INTERFACE_URL='http://172.22.32.8:25100/magic/web/index.html' +VITE_INTERFACE_URL='http://172.22.32.8:90/magic/web/index.html' # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.22.32.8:25100' +VITE_JMREPORT_BASE_URL='http://172.22.32.8:90' diff --git a/.env.hella9 b/.env.hella9 index 0fe877377..308a2ffd2 100644 --- a/.env.hella9 +++ b/.env.hella9 @@ -4,10 +4,10 @@ NODE_ENV=production VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://172.22.32.9:25100/api' +VITE_BASE_URL='http://172.22.32.9/api' # 上传路径 -VITE_UPLOAD_URL='http://172.22.32.9:25100/api/admin-api/infra/file/upload' +VITE_UPLOAD_URL='http://172.22.32.9/api/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH= @@ -31,7 +31,7 @@ VITE_BASE_PATH=/ VITE_OUT_DIR=sfms3.0 # 自定义接口路径 -VITE_INTERFACE_URL='http://172.22.32.9:25100/magic/web/index.html' +VITE_INTERFACE_URL='http://172.22.32.9:90/magic/web/index.html' # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.22.32.9:25100' +VITE_JMREPORT_BASE_URL='http://172.22.32.9:90' diff --git a/Dockerfile_hella b/Dockerfile_hella new file mode 100644 index 000000000..622b74a83 --- /dev/null +++ b/Dockerfile_hella @@ -0,0 +1,7 @@ +# 设置基础镜像 +FROM win-nginx + +WORKDIR /opt/sfms3.0 +COPY nginx_hella.conf /usr/local/nginx/conf/nginx.conf +# 将dist文件中的内容复制到 /opt/sfms3.0 这个目录下面 +COPY sfms3.0/ /opt/sfms3.0 diff --git a/nginx_hella.conf b/nginx_hella.conf new file mode 100644 index 000000000..b849be01c --- /dev/null +++ b/nginx_hella.conf @@ -0,0 +1,53 @@ +user root; +worker_processes 2; + +events { + worker_connections 1024; +} + +http { + include mime.types; + charset utf-8,gbk; + default_type application/octet-stream; + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for" "$request_time $upstream_response_time"'; + access_log logs/access.log main; + sendfile on; + #tcp_nopush on; + keepalive_timeout 600s; + client_max_body_size 200m; + gzip on; + gzip_min_length 10k; + gzip_comp_level 9; + gzip_buffers 4 16k; + gzip_types text/plain application/javascript text/css application/xml text/javascript image/jpeg image/gif image/png; + gzip_vary on; + gzip_disable "MSIE [1-6]\."; + upstream sfms3.0 { + server localhost:90 weight=10 max_fails=3 fail_timeout=10s; + } + server { + listen 80; + server_name_in_redirect off; + server_name _; + location /api/ { + proxy_pass http://sfms3.0/; + proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header; + proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $http_x_forwarded_for; + } + location /profile/ { + alias /opt/profile/; + index index.html index.htm; + } + location / { + try_files $uri $uri/ /index.html; + root /opt/sfms3.0; + index index.html index.htm; + } + } +} +