magricambi/dockerfile/Dockerfile

27 lines
461 B
Text
Raw Normal View History

2026-05-26 14:17:10 +02:00
# BUILD
FROM node:20-alpine AS builder
WORKDIR /magricambi
COPY package*.json ./
RUN npm install
COPY . .
2026-10-19 17:10:49 +02:00
ENV NODE_OPTIONS:--max-old-space-size=768
2026-05-26 14:17:10 +02:00
RUN npm run build
#PRODUCTION (standalone)
FROM node:20-alpine
WORKDIR /magricambi
ENV NODE_ENV=production
COPY --from=builder /magricambi/.next/standalone ./
COPY --from=builder /magricambi/.next/static ./.next/static
COPY --from=builder /magricambi/public ./public
EXPOSE 3000
CMD ["node","server.js"]