From 81021daf2050001bc5dc33dafd730c26824b3a2d Mon Sep 17 00:00:00 2001 From: codesejin Date: Mon, 17 Jul 2023 00:37:11 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8B=A4=EC=8B=9C=20=EC=BB=A4=EB=B0=8B?= =?UTF-8?q?=EB=82=B4=EC=9A=A9=20=EB=B3=B5=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 7 ++++++- docker-compose.yml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9d3ab8c..6273b24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,12 +6,16 @@ ENTRYPOINT ["top", "-b"] # 베이스 이미지 선택 FROM node:18 +ENV NODE_ENV production + WORKDIR /src + # 앱 종속성 설치 COPY package.json ./ RUN npm install + # 앱 소스 코드 복사 COPY . . @@ -25,4 +29,5 @@ EXPOSE 3000 # RUN chmod +x /wait-for-it.sh # 앱 실행 명령 -CMD /wait-for-it.sh mysql:3306 -- npm run start:seed \ No newline at end of file +# CMD /wait-for-it.sh mysql:3306 -- npm run start:seed +CMD ["npm", "run", "start:prod"] diff --git a/docker-compose.yml b/docker-compose.yml index 87d475a..b6a87b9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,4 +27,4 @@ services: MYSQL_DATABASE: animalnest TZ: Asia/Seoul ports: - - '3307:3306' \ No newline at end of file + - '3306:3306' \ No newline at end of file