Files
DeepAudit/Dockerfile
T
lintsinghua 9054f0d2c5 feat: v2.0.0-test release
Major changes:
- Backend: Add report generator service with comprehensive analysis
- Backend: Enhanced scan and task endpoints
- Frontend: Refactor instant analysis page and export dialog
- Frontend: Optimize report export service
- Infrastructure: Simplify Dockerfile and update docker-compose
- Docs: Streamline README documentation
- Assets: Add logo with transparent background
2025-11-28 20:34:15 +08:00

36 lines
663 B
Docker

# 多阶段构建 - 构建阶段
FROM node:20-alpine AS builder
# 设置工作目录
WORKDIR /app
# 安装 pnpm
RUN npm install -g pnpm
# 复制前端项目文件
COPY frontend/package.json frontend/pnpm-lock.yaml ./
# 安装依赖
RUN pnpm install --frozen-lockfile
# 复制前端源代码
COPY frontend/ .
# 构建应用
RUN pnpm build
# 生产阶段 - 使用 nginx 提供静态文件服务
FROM nginx:alpine
# 复制自定义 nginx 配置
COPY nginx.conf /etc/nginx/conf.d/default.conf
# 从构建阶段复制构建产物
COPY --from=builder /app/dist /usr/share/nginx/html
# 暴露端口
EXPOSE 80
# 启动 nginx
CMD ["nginx", "-g", "daemon off;"]