magricambi/dockerfile/Dockerfile

27 lines
462 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 . .
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"]