更新 Dockerfile

This commit is contained in:
ywp
2025-10-22 15:56:06 +08:00
parent fdcdd447eb
commit 411f8d8f71

View File

@ -8,9 +8,10 @@ WORKDIR /app
# 安装顶层依赖(如果有前端构建) # 安装顶层依赖(如果有前端构建)
# 再复制源码(包括前端项目) # 再复制源码(包括前端项目)
COPY . . RUN npm config set registry https://registry.npmmirror.com
COPY package*.json ./
RUN npm ci RUN npm ci
COPY . .
RUN npm run build RUN npm run build
# 拷贝前端、后端、静态资源 # 拷贝前端、后端、静态资源