From d11233dfffafc00497ce20d4186567717be67ad2 Mon Sep 17 00:00:00 2001 From: liuchen864 <23082234@qq.com> Date: Fri, 10 Jan 2025 10:08:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dl-check | 50 ++++++++++++++++++++++++ .env.dl-prod | 50 ++++++++++++++++++++++++ .env.dl-test | 50 ++++++++++++++++++++++++ Dockerfile_prod | 7 ---- Dockerfile_scp | 7 ---- nginx_prod.conf | 101 ------------------------------------------------ nginx_scp.conf | 53 ------------------------- package.json | 3 ++ 8 files changed, 153 insertions(+), 168 deletions(-) create mode 100644 .env.dl-check create mode 100644 .env.dl-prod create mode 100644 .env.dl-test delete mode 100644 Dockerfile_prod delete mode 100644 Dockerfile_scp delete mode 100644 nginx_prod.conf delete mode 100644 nginx_scp.conf diff --git a/.env.dl-check b/.env.dl-check new file mode 100644 index 000000000..8c11fb262 --- /dev/null +++ b/.env.dl-check @@ -0,0 +1,50 @@ +# 生产环境 +NODE_ENV=test + +VITE_DEV=false + +# 请求路径 +VITE_BASE_URL='http://172.16.0.13/api' + +# 上传路径 +VITE_UPLOAD_URL='http://172.16.0.13/api/admin-api/infra/file/upload' + +# 接口前缀 +VITE_API_BASEPATH= + +# 接口地址 +VITE_API_URL=/admin-api + +# 是否删除debugger +VITE_DROP_DEBUGGER=true + +# 是否删除console.log +VITE_DROP_CONSOLE=true + +# 是否sourcemap +VITE_SOURCEMAP=false + +# 打包路径 +VITE_BASE_PATH=/ + +# 输出路径 +VITE_OUT_DIR=sfms3.0 + +# 自定义接口路径 +VITE_INTERFACE_URL='http://172.16.0.13/magic/web/index.html' + +# 积木报表请求路径 +VITE_JMREPORT_BASE_URL='http://172.16.0.13' + + +# 租户配置 +VITE_TENANT='["德立天津工厂"]' + +# 查看质检报告环境 +VITE_REPORT_URL = 'http://172.16.0.13' + +# 是否需要验证码 +VITE_NEED_CODE = false + +# 是否需要下载PDA链接 +VITE_PDA_URL = false diff --git a/.env.dl-prod b/.env.dl-prod new file mode 100644 index 000000000..8c11fb262 --- /dev/null +++ b/.env.dl-prod @@ -0,0 +1,50 @@ +# 生产环境 +NODE_ENV=test + +VITE_DEV=false + +# 请求路径 +VITE_BASE_URL='http://172.16.0.13/api' + +# 上传路径 +VITE_UPLOAD_URL='http://172.16.0.13/api/admin-api/infra/file/upload' + +# 接口前缀 +VITE_API_BASEPATH= + +# 接口地址 +VITE_API_URL=/admin-api + +# 是否删除debugger +VITE_DROP_DEBUGGER=true + +# 是否删除console.log +VITE_DROP_CONSOLE=true + +# 是否sourcemap +VITE_SOURCEMAP=false + +# 打包路径 +VITE_BASE_PATH=/ + +# 输出路径 +VITE_OUT_DIR=sfms3.0 + +# 自定义接口路径 +VITE_INTERFACE_URL='http://172.16.0.13/magic/web/index.html' + +# 积木报表请求路径 +VITE_JMREPORT_BASE_URL='http://172.16.0.13' + + +# 租户配置 +VITE_TENANT='["德立天津工厂"]' + +# 查看质检报告环境 +VITE_REPORT_URL = 'http://172.16.0.13' + +# 是否需要验证码 +VITE_NEED_CODE = false + +# 是否需要下载PDA链接 +VITE_PDA_URL = false diff --git a/.env.dl-test b/.env.dl-test new file mode 100644 index 000000000..8c11fb262 --- /dev/null +++ b/.env.dl-test @@ -0,0 +1,50 @@ +# 生产环境 +NODE_ENV=test + +VITE_DEV=false + +# 请求路径 +VITE_BASE_URL='http://172.16.0.13/api' + +# 上传路径 +VITE_UPLOAD_URL='http://172.16.0.13/api/admin-api/infra/file/upload' + +# 接口前缀 +VITE_API_BASEPATH= + +# 接口地址 +VITE_API_URL=/admin-api + +# 是否删除debugger +VITE_DROP_DEBUGGER=true + +# 是否删除console.log +VITE_DROP_CONSOLE=true + +# 是否sourcemap +VITE_SOURCEMAP=false + +# 打包路径 +VITE_BASE_PATH=/ + +# 输出路径 +VITE_OUT_DIR=sfms3.0 + +# 自定义接口路径 +VITE_INTERFACE_URL='http://172.16.0.13/magic/web/index.html' + +# 积木报表请求路径 +VITE_JMREPORT_BASE_URL='http://172.16.0.13' + + +# 租户配置 +VITE_TENANT='["德立天津工厂"]' + +# 查看质检报告环境 +VITE_REPORT_URL = 'http://172.16.0.13' + +# 是否需要验证码 +VITE_NEED_CODE = false + +# 是否需要下载PDA链接 +VITE_PDA_URL = false diff --git a/Dockerfile_prod b/Dockerfile_prod deleted file mode 100644 index e2a9419c2..000000000 --- a/Dockerfile_prod +++ /dev/null @@ -1,7 +0,0 @@ -# 设置基础镜像 -FROM win-nginx - -WORKDIR /opt/sfms3.0 -COPY nginx_prod.conf /usr/local/nginx/conf/nginx.conf -# 将dist文件中的内容复制到 /opt/sfms3.0 这个目录下面 -COPY sfms3.0/ /opt/sfms3.0 diff --git a/Dockerfile_scp b/Dockerfile_scp deleted file mode 100644 index 700cdf9a9..000000000 --- a/Dockerfile_scp +++ /dev/null @@ -1,7 +0,0 @@ -# 设置基础镜像 -FROM win-nginx - -WORKDIR /opt/sfms3.0 -COPY nginx_scp.conf /usr/local/nginx/conf/nginx.conf -# 将dist文件中的内容复制到 /opt/sfms3.0 这个目录下面 -COPY sfms3.0/ /opt/sfms3.0 diff --git a/nginx_prod.conf b/nginx_prod.conf deleted file mode 100644 index 7cd6ed0f8..000000000 --- a/nginx_prod.conf +++ /dev/null @@ -1,101 +0,0 @@ -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; - } - } - server { - listen 55563 ssl; - server_name_in_redirect off; - server_name _; - ssl_certificate /opt/faway-hella/faway-hella.com.pem; - ssl_certificate_key /opt/faway-hella/faway-hella.com.key; - 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; - } - } - server { - listen 56563 ssl; - server_name_in_redirect off; - server_name _; - ssl_certificate /opt/faway-hella/faway-hella.com.pem; - ssl_certificate_key /opt/faway-hella/faway-hella.com.key; - 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; - } - } -} - diff --git a/nginx_scp.conf b/nginx_scp.conf deleted file mode 100644 index 00a1a93ea..000000000 --- a/nginx_scp.conf +++ /dev/null @@ -1,53 +0,0 @@ -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:25311 weight=10 max_fails=3 fail_timeout=10s; - } - server { - listen 25400; - 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; - } - } -} - diff --git a/package.json b/package.json index be8467242..3456f9c80 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,9 @@ "test-scp": "vite build --mode test-scp", "prod": "vite build --mode prod", "preview": "vite preview", + "dl-prod": "vite build --mode dl-prod", + "dl-test": "vite build --mode dl-test", + "dl-check": "vite build --mode dl-check", "lint": "eslint --fix --ext .js,.vue src" }, "dependencies": {