diff --git a/Dockerfile b/Dockerfile index 59afe494..073b722a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20 +FROM node:20-alpine AS build WORKDIR /app @@ -6,6 +6,18 @@ COPY . . RUN npm ci -EXPOSE 5173 +RUN npm run build -ENTRYPOINT npm run build && npm run preview \ No newline at end of file + +FROM nginx:alpine + +COPY --from=build /app/dist /usr/share/nginx/html + +COPY entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +EXPOSE 80 + +ENTRYPOINT [ "/entrypoint.sh" ] + +CMD ["nginx"] \ No newline at end of file