first commit

This commit is contained in:
2026-06-22 21:36:51 +09:00
commit fb25027bdc
26 changed files with 1006 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
# Build stage
FROM node:20-alpine AS builder
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
# Prisma client 생성 및 TypeScript 빌드
RUN npx prisma generate
RUN npm run build
# Production stage
FROM node:20-alpine
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install --only=production
COPY --from=builder /usr/src/app/dist ./dist
COPY --from=builder /usr/src/app/node_modules/.prisma ./node_modules/.prisma
COPY --from=builder /usr/src/app/node_modules/@prisma/client ./node_modules/@prisma/client
COPY --from=builder /usr/src/app/prisma ./prisma
EXPOSE 4000
# Prisma 마이그레이션 실행 후 백엔드 서버 실행
CMD ["sh", "-c", "npx prisma migrate deploy && node dist/index.js"]