File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 77 # ---- build ----
88 FROM node:20-alpine AS builder
99 WORKDIR /app
10+ ENV NEXT_TELEMETRY_DISABLED=1
1011 COPY --from=deps /app/node_modules ./node_modules
1112 COPY . .
1213 RUN npm run build
1516 FROM node:20-alpine AS runner
1617 WORKDIR /app
1718 ENV NODE_ENV=production
19+ ENV NEXT_TELEMETRY_DISABLED=1
1820
19- # If you use Next "standalone" output, enable it in next.config first.
20- # Otherwise this still works fine by copying .next + node_modules.
21-
22- COPY --from=builder /app/package*.json ./
23- COPY --from=builder /app/node_modules ./node_modules
24- COPY --from=builder /app/.next ./.next
21+ # Standalone server + minimal files
22+ COPY --from=builder /app/.next/standalone ./
23+ COPY --from=builder /app/.next/static ./.next/static
2524 COPY --from=builder /app/public ./public
2625
2726 EXPOSE 3000
28- CMD ["npm" , "run" , "start" ]
27+ # Standalone output creates server.js at root
28+ CMD ["node" , "server.js" ]
2929
You can’t perform that action at this time.
0 commit comments