andreavillari/dockerfile/Dockerfile
2026-10-26 00:57:06 +01:00

26 lines
No EOL
537 B
Docker

# BUILD
FROM node:20-alpine AS builder
WORKDIR /root/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 /root/andreavillari/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx","-g","daemon off;"]