modifica a Dockerfile 2
This commit is contained in:
parent
22d4c2ed28
commit
df5bd93c0a
1 changed files with 11 additions and 4 deletions
|
|
@ -6,13 +6,20 @@ WORKDIR /andreavillari
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
|
# Copia del codice sorgente
|
||||||
COPY . .
|
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
|
RUN npm run builder
|
||||||
|
|
||||||
#RPUDUCTION (standalone)
|
#PRODUCTION (standalone)
|
||||||
FROM mginx:20-alpine
|
|
||||||
COpY --from-builder /andreavillari
|
# --- STAGE 2 : Production (Serve file statici con Nginx)---
|
||||||
|
FROM nginx:alpine
|
||||||
|
COPY --from-builder /andreavillari
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue