modifica a Dockerfile 2

This commit is contained in:
Andre Villari 2026-10-25 23:54:52 +01:00
parent 22d4c2ed28
commit df5bd93c0a

View file

@ -6,13 +6,20 @@ WORKDIR /andreavillari
COPY package*.json ./
RUN npm install
# Copia del codice sorgente
COPY . .
ENV NODE_OPTIONS:--max-old-space-size-768
# Impostazioni limite meoria Node.js
ENV NODE_OPTIONS:"--max-old-space-size=768"
# Esexuzione della build (verifica che nel package.json ci sia "build")
RUN npm run builder
#RPUDUCTION (standalone)
FROM mginx:20-alpine
COpY --from-builder /andreavillari
#PRODUCTION (standalone)
# --- STAGE 2 : Production (Serve file statici con Nginx)---
FROM nginx:alpine
COPY --from-builder /andreavillari
EXPOSE 80