From 95547217d26c73adc9c35c66633e88f7a913db3a Mon Sep 17 00:00:00 2001 From: fcarraUniSa Date: Wed, 18 Feb 2026 14:33:56 +0100 Subject: [PATCH] Update Dockerfile --- Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3fbc0b0..14af59d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,22 @@ -# Usa Node 20 standard (non slim) per garantire tutte le dipendenze di build -FROM node:20 AS build +# Build stage +FROM node:20-alpine AS build WORKDIR /app COPY package.json ./ -# Installazione standard (veloce, parallela) +# Install dependencies RUN npm install COPY . . -# Impostiamo 4GB di RAM per il processo di build (hai ~6GB liberi) -# Questo previene il crash durante la compilazione di librerie pesanti come react-markdown +# 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