From f72810004261379387f2742b0692b4448726a2c2 Mon Sep 17 00:00:00 2001 From: eunhak Date: Tue, 2 Jul 2024 02:20:22 +0900 Subject: [PATCH] dockerfile fix --- Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index abf5c39..3cf4c18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,17 +9,15 @@ RUN yarn install COPY . . RUN yarn build -# Step 2: Serve the Vite app using PM2 +# Step 2: Serve the Vite app using a static file server FROM node:20-alpine WORKDIR /app COPY --from=builder /app/dist /app -RUN npm install -g pm2 serve - -COPY ecosystem.config.js ./ +RUN npm install -g serve EXPOSE 3000 -CMD ["pm2-runtime", "start", "ecosystem.config.js"] \ No newline at end of file +CMD ["serve", "-s", ".", "-l", "3000","node", "server.js"] \ No newline at end of file