diff --git a/.env.production b/.env.production index a6c1280b0..31f9c9f27 100644 --- a/.env.production +++ b/.env.production @@ -28,7 +28,7 @@ VITE_SOURCEMAP=false VITE_BASE_PATH=/ # 输出路径 -VITE_OUT_DIR=dist +VITE_OUT_DIR=sfms3.0 # 自定义接口路径 VITE_INTERFACE_URL='http://10.62.193.15:25100/magic/web/index.html' diff --git a/.env.test b/.env.test index 78536f89d..0c997f086 100644 --- a/.env.test +++ b/.env.test @@ -28,7 +28,7 @@ VITE_SOURCEMAP=false VITE_BASE_PATH=/ # 输出路径 -VITE_OUT_DIR=dist +VITE_OUT_DIR=sfms3.0 # 自定义接口路径 VITE_INTERFACE_URL='http://dev.ccwin-in.com:25110/magic/web/index.html' diff --git a/Dockerfile b/Dockerfile index 902b6a496..ccf15bc1d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ # 设置基础镜像 FROM nginx -# 将dist文件中的内容复制到 /usr/share/nginx/html/ 这个目录下面 -COPY dist/ /usr/share/nginx/html/ + +WORKDIR /opt/sfms3.0 COPY nginx.conf /etc/nginx/nginx.conf +# 将dist文件中的内容复制到 /usr/share/nginx/html/ 这个目录下面 +COPY sfms3.0/ /opt/sfms3.0 diff --git a/nginx.conf b/nginx.conf index b0cc29718..0ec811aa4 100644 --- a/nginx.conf +++ b/nginx.conf @@ -61,7 +61,7 @@ http { proxy_cache_valid 200 304 12h; proxy_cache_key $host$uri$is_args$args; try_files $uri $uri/ /index.html; - root /usr/share/nginx/html; + root /opt/sfms3.0; index index.html index.htm; } } diff --git a/package.json b/package.json index cf2eff10c..9f3a5a8c0 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "private": false, "scripts": { "dev": "vite", - "test": "vite build --mode test", - "prod": "vite build --mode production", + "test": "vite build --mode test --max-old-space-size=4096", + "prod": "vite build --mode production --max-old-space-size=4096", "preview": "vite preview", "lint": "eslint --fix --ext .js,.vue src" },