Skip to content

Commit

Permalink
feat : yarn set version berry
Browse files Browse the repository at this point in the history
  • Loading branch information
9yujin committed Feb 3, 2024
1 parent 25cd793 commit aa75d5a
Showing 1 changed file with 26 additions and 17 deletions.
43 changes: 26 additions & 17 deletions Dockerfile.ticket
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
FROM node:16-alpine AS builder

# 작업 디렉토리 설정
# set working directory
WORKDIR /app

# package.json 및 yarn.lock 파일 복사
# install app dependencies
#copies package.json and package-lock.json to Docker environment
# COPY package-lock.json ./
COPY package.json ./
COPY yarn.lock ./

# Yarn을 최신 버전으로 업그레이드
RUN npm install [email protected] --global --force

# 의존성 설치
# Installs all node packages
# RUN npm ci
RUN npm install yarn --global --force
RUN yarn set version berry
RUN yarn install --immutable --immutable-cache --check-cache

# 애플리케이션 소스 복사
COPY . ./

# 필요없는 디렉토리 제거
# Copies everything over to Docker environment
COPY . ./
RUN rm -rf apps/admin

# 앱 빌드
RUN yarn install
# RUN npm run build
RUN yarn ticket:build

# 캐시 제거
RUN rm -rf apps/ticket/.next/cache

#Stage 2
#######################################
#pull the official nginx:1.19.0 base image
# FROM nginx:1.19.0
#copies React to the container directory
# Set working directory to nginx resources directory
# WORKDIR /usr/share/nginx/html
# COPY ./nginx/ticket.conf /etc/nginx/conf.d/default.conf
# Remove default nginx static resources
# RUN rm -rf ./usr/share/nginx/html/*
# Copies static resources from builder stage
# COPY --from=builder /app/build /usr/share/nginx/html/
# Containers run nginx with global directives and daemon off
EXPOSE 3000

CMD ["yarn", "ticket:start"]
CMD ["yarn", "ticket:start"]

0 comments on commit aa75d5a

Please sign in to comment.