Skip to content

Commit

Permalink
feat: 도커파일 수정 (#316)
Browse files Browse the repository at this point in the history
* feat : 랜딩페이지 리뉴얼 title

* feat : 헤더 색상 컨텍스트 관리

* feat: 랜딩페이지 리뉴얼

* feat: 도커파일 수정

---------

Co-authored-by: 9yujin <[email protected]>
  • Loading branch information
9yujin and 9yujin authored Feb 3, 2024
1 parent 1fb113a commit 25cd793
Showing 1 changed file with 16 additions and 24 deletions.
40 changes: 16 additions & 24 deletions Dockerfile.ticket
Original file line number Diff line number Diff line change
@@ -1,38 +1,30 @@
FROM node:16-alpine AS builder
# set working directory

# 작업 디렉토리 설정
WORKDIR /app
# install app dependencies
#copies package.json and package-lock.json to Docker environment
# COPY package-lock.json ./

# package.json 및 yarn.lock 파일 복사
COPY package.json ./
COPY yarn.lock ./
# Installs all node packages
# RUN npm ci
RUN npm install yarn --global --force
RUN yarn install --immutable --immutable-cache --check-cache

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

# 의존성 설치
RUN yarn install --immutable --immutable-cache --check-cache

# 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"]

0 comments on commit 25cd793

Please sign in to comment.