diff --git a/Dockerfiles/Dockerfile_frontend b/Dockerfiles/Dockerfile_frontend new file mode 100644 index 0000000..9f0752e --- /dev/null +++ b/Dockerfiles/Dockerfile_frontend @@ -0,0 +1,13 @@ +FROM node:20-alpine AS builder +ARG VITE_BACKEND_API_BASE_URL +ENV VITE_BACKEND_API_BASE_URL=$VITE_BACKEND_API_BASE_URL +WORKDIR /app +COPY modules/frontend/ ./ +RUN echo "VITE_BACKEND_API_BASE_URL=$VITE_BACKEND_API_BASE_URL" +RUN npm install +RUN npm run build + +FROM nginx:alpine +COPY --from=builder /app/dist /usr/share/nginx/html +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file