chore: mqsrv backend

This commit is contained in:
Chen Gu
2026-05-09 00:52:04 +08:00
commit b84f111e8f
21 changed files with 4593 additions and 0 deletions

28
Dockerfile Normal file
View File

@@ -0,0 +1,28 @@
# 第一阶段: 构建
FROM node:22-alpine AS builder
WORKDIR /app
# 安装必要的系统依赖Prisma 需要)
RUN apk add --no-cache openssl
COPY package*.json ./
RUN npm ci
COPY . .
RUN npx prisma generate
RUN npx tsc
# 第二阶段: 运行
FROM node:22-alpine
WORKDIR /app
# 安装 OpenSSLPrisma 运行时依赖)
RUN apk add --no-cache openssl
COPY --from=builder /app/package*.json ./
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/prisma ./prisma
EXPOSE 3001
CMD ["node", "dist/index.js"]