Files
Edu/services/core-edu/Dockerfile
SpecialX d11441c9a8 feat(core-edu): v2 P3.14 考试实时事件 + pino 修复
新增 3 RPC:ExtendExam/ForceSubmitExam/ReorderExamQuestions

新增 3 Kafka 事件:exam.extended/exam.force_submitted/exam.question_reordered

exams.service.ts 新增 3 方法 + Outbox 事务内写入 + TOPIC_MAP 映射

grpc.server.ts 注册 3 handler + grpc-smoke 测试

logger.ts pino 导入修复(import pino → import { pino })

27/27 smoke test 通过
2026-07-14 22:58:38 +08:00

28 lines
952 B
Docker
Raw 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.
# 单阶段构建(测试用)- 使用 repo 根作为 build context
# 构建命令: docker build -t edu/core-edu:test -f services/core-edu/Dockerfile .
FROM node:22-alpine
WORKDIR /app
# 安装 pnpm
RUN corepack enable && corepack prepare pnpm@11.13.0 --activate
# 复制 workspace 配置和共享包
COPY package.json pnpm-lock.yaml* pnpm-workspace.yaml tsconfig.base.json ./
COPY packages/shared-proto ./packages/shared-proto
# 复制 core-edu 服务文件
COPY services/core-edu/package.json services/core-edu/tsconfig.json services/core-edu/nest-cli.json ./services/core-edu/
COPY services/core-edu/src ./services/core-edu/src
# 安装依赖并构建
WORKDIR /app/services/core-edu
RUN pnpm install --no-frozen-lockfile
RUN npx tsc
# 复制 proto 文件到 /app/protogrpc.server.ts 的 fallback 路径)
RUN cp -r /app/packages/shared-proto/proto /app/proto
EXPOSE 3004 50053
WORKDIR /app/services/core-edu
CMD ["node", "dist/main.js"]