andreavillari/dockerfile/Dockerfile
2026-10-25 23:54:52 +01:00

26 lines
No EOL
500 B
Docker

# BUILD
FROM node:20-alpine AS builder
WORKDIR /andreavillari
COPY package*.json ./
RUN npm install
# Copia del codice sorgente
COPY . .
# 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
#PRODUCTION (standalone)
# --- STAGE 2 : Production (Serve file statici con Nginx)---
FROM nginx:alpine
COPY --from-builder /andreavillari
EXPOSE 80
CMD ["nginx","-g","daemon off;"]