From 18971cc9eb4131feba3126379feb15df0c33f39c Mon Sep 17 00:00:00 2001 From: aaron <> Date: Fri, 25 Apr 2025 11:31:34 +0800 Subject: [PATCH] update --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b57f55b..23917ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ COPY package*.json ./ # 安装依赖 RUN npm install -# 复制所有源代码 +# 复制项目文件 COPY . . # 构建应用 @@ -22,9 +22,12 @@ RUN npm run build # 生产阶段 FROM nginx:stable-alpine as production-stage -# 从构建阶段复制构建好的文件到nginx目录 +# 将构建好的文件复制到nginx目录 COPY --from=build-stage /app/dist /usr/share/nginx/html +# 复制nginx配置文件 +COPY nginx.conf /etc/nginx/conf.d/default.conf + # 暴露80端口 EXPOSE 80