-
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 27318fc
Showing
1 changed file
with
6 additions
and
10 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,30 +1,26 @@ | ||
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 설치 스크립트를 사용하여 Yarn 설치 | ||
RUN npm install -g corepack | ||
RUN corepack enable | ||
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 | ||
|
||
CMD ["yarn", "ticket:start"] | ||
CMD ["yarn", "ticket:start"] |