오창섭 sprint-mission-11#92
Merged
Kang-kyunghun merged 33 commits intocodeit-bootcamp-nodejs:오창섭from Feb 15, 2026
Hidden character warning
The head ref may contain hidden characters: "\uc624\ucc3d\uc12d-sprint11"
Merged
Conversation
67c374c to
3e553a7
Compare
| @@ -0,0 +1,28 @@ | |||
| FROM node:22-alpine AS builder | |||
Collaborator
There was a problem hiding this comment.
아래처럼 수정하여 조금 더 최적화 할 수 있지 않을까 합니다.
저게 완전한 정답은 아닙니다. 현재 구성에서 어떤 것들을 변화시켜 최적화 할 수 있는지 확인해 보시면 좋을 것 같습니다.
# ============= Builder Stage =============
FROM node:22-alpine AS builder
RUN apk add --no-cache openssl
WORKDIR /server
# 의존성 설치를 위한 파일만 먼저 복사 (레이어 캐싱 최적화)
COPY package.json package-lock.json ./
RUN npm ci
# 소스 코드 복사
COPY prisma ./prisma
COPY src ./src
COPY tsconfig.json ./
# Prisma 클라이언트 생성 및 빌드
RUN npx prisma generate
RUN npm run build
# ============= Runner Stage =============
FROM node:22-alpine AS runner
RUN apk add --no-cache openssl
WORKDIR /server
# 프로덕션 의존성만 설치
COPY package.json package-lock.json ./
RUN npm ci --omit=dev
# Prisma 스키마만 복사 (클라이언트 생성용)
COPY prisma ./prisma
RUN npx prisma generate
# 빌드된 파일만 복사
COPY --from=builder /server/dist ./dist
EXPOSE 3000
CMD ["node", "dist/index.js"]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
미션 목표
요구사항
기본
Github Actions 활용
Docker 이미지 만들기
제출 안내
주요 변경사항
멘토에게