项目框架

This commit is contained in:
2026-10-16 16:28:39 +08:00
commit 071b54d3b3
155 changed files with 10474 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
# ============ 构建阶段 ============
FROM node:20-alpine AS build
WORKDIR /app
# 使用国内镜像源加速(生产可换回官方源)
RUN npm config set registry https://registry.npmmirror.com
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# ============ 运行阶段 ============
FROM nginx:1.25-alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]