Skip to content

Commit

Permalink
fix dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
eun-hak committed Jul 1, 2024
1 parent b32abc4 commit 99d6ac6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ RUN yarn install
COPY . .
RUN yarn build

# Step 2: Serve the Vite app with Nginx
FROM nginx:alpine
# Step 2: Serve the Vite app using a simple HTTP server
FROM node:20-alpine

COPY --from=builder /app/dist /usr/share/nginx/html
WORKDIR /app

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

COPY nginx.conf /etc/nginx/nginx.conf
RUN npm install -g serve

EXPOSE 80
EXPOSE 3000

CMD ["nginx", "-g", "daemon off;"]
CMD ["serve", "-s", ".", "-l", "3000"]

0 comments on commit 99d6ac6

Please sign in to comment.