-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
9yujin
committed
Feb 3, 2024
1 parent
25cd793
commit c4f6371
Showing
1 changed file
with
6 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,25 @@ | ||
FROM node:16-alpine AS builder | ||
|
||
# 작업 디렉토리 설정 | ||
WORKDIR /app | ||
|
||
# package.json 및 yarn.lock 파일 복사 | ||
COPY package.json ./ | ||
COPY yarn.lock ./ | ||
|
||
# Yarn을 최신 버전으로 업그레이드 | ||
RUN npm install [email protected] --global --force | ||
# Yarn 1.x를 설치합니다 (알파인 이미지에는 이미 설치되어 있을 수 있음) | ||
RUN npm install -g yarn | ||
|
||
# Yarn 버전을 프로젝트에 필요한 버전으로 업그레이드 | ||
RUN yarn set version berry | ||
RUN yarn set version 3.3.0 | ||
|
||
# 의존성 설치 | ||
RUN yarn install --immutable --immutable-cache --check-cache | ||
|
||
# 애플리케이션 소스 복사 | ||
COPY . ./ | ||
|
||
# 필요없는 디렉토리 제거 | ||
RUN rm -rf apps/admin | ||
|
||
# 앱 빌드 | ||
RUN yarn ticket:build | ||
|
||
# 캐시 제거 | ||
RUN rm -rf apps/ticket/.next/cache | ||
|
||
EXPOSE 3000 | ||
|