# Build stage FROM node:20-alpine AS build WORKDIR /app COPY package.json ./ # Install dependencies RUN npm install COPY . . # Increase memory limit for the build process to 4GB ENV NODE_OPTIONS="--max-old-space-size=4096" # Build the application RUN npm run build # Production stage FROM nginx:alpine COPY nginx.conf /etc/nginx/conf.d/default.conf COPY --from=build /app/dist /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]