Skip to content

Commit

Permalink
pm2 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
eun-hak committed Jul 2, 2024
1 parent 0b20f7d commit 514220f
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,17 @@ ENV VITE_APP_SERVER_HOST=${VITE_APP_SERVER_HOST}

RUN yarn build

# Step 2: Serve the Vite app using PM2
# Step 2: Serve the Vite app using serve
FROM node:20-alpine

WORKDIR /app

COPY --from=builder /app/dist /app

# PM2와 serve 설치
RUN npm install -g pm2 serve
# serve 설치
RUN npm install -g serve

EXPOSE 3000

# ESM 모듈을 지원하기 위해 NODE_OPTIONS 설정 추가
ENV NODE_OPTIONS="--experimental-modules"

# PM2를 사용하여 serve 실행
CMD ["pm2-runtime", "serve", "-s", ".", "-l", "3000"]
# serve 실행
CMD ["serve", "-s", ".", "-l", "3000"]

0 comments on commit 514220f

Please sign in to comment.