WuYongJie ba98bf22cc feat: 添加许可证系统、Agent部署模块和Harbor镜像管理
- 新增许可证服务器 (license-server/)
- 新增 Agent 部署模块 (flnxi-agent/)
- 添加许可证验证和激活页面
- 添加 Harbor 镜像同步脚本
- 更新素材系统支持许可证验证
2025-12-15 21:19:46 +08:00

43 lines
953 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 多阶段构建 - 前端
FROM node:20-alpine AS frontend-builder
WORKDIR /app/frontend
COPY frontend/package*.json ./
RUN npm ci
COPY frontend/ ./
RUN npm run build
# 多阶段构建 - 后端
FROM node:20-alpine AS backend-builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY tsconfig.json ./
COPY src/ ./src/
# 只编译 TypeScript,不运行 build:frontend(前端已单独构建)
RUN npx tsc
# 最终镜像
FROM node:20-alpine
WORKDIR /app
# 安装 docker cli(用于与宿主机 docker 通信)
RUN apk add --no-cache docker-cli
# 复制构建产物
COPY --from=backend-builder /app/dist ./dist
COPY --from=backend-builder /app/node_modules ./node_modules
COPY --from=frontend-builder /app/frontend/dist ./dist/public
COPY package.json ./
# 复制版本文件
ARG AGENT_VERSION=1.0.0
RUN echo "${AGENT_VERSION}" > /app/VERSION.txt
# 环境变量
ENV NODE_ENV=production
ENV PORT=3080
EXPOSE 3080
CMD ["node", "dist/server.js"]