From a3d80b10237c92b2d994c345d90df494ba70bacc Mon Sep 17 00:00:00 2001 From: aaron <> Date: Mon, 24 Feb 2025 23:40:53 +0800 Subject: [PATCH] update --- Dockerfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2d97824..d1180dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,12 +23,10 @@ RUN npm run build # 生产阶段 FROM nginx:stable-alpine as production-stage -# 复制构建产物到 Nginx 目录 -COPY --from=build-stage /app/dist /usr/share/nginx/html - -# 复制 static 目录下的文件到 Nginx 根目录 -COPY static/ /usr/share/nginx/html/ - +# 将构建好的文件复制到 nginx 目录 +COPY --from=build-stage /app/dist /usr/share/nginx/html/ +# 将 static 目录下的文件直接复制到网站根目录 +COPY --from=build-stage /app/src/static /usr/share/nginx/html/ # 暴露 80 端口 EXPOSE 80