Files
Aut.ManagementFaculty/Dockerfile.prebuilt
T

26 lines
709 B
Docker

# Packs a pre-built Next.js standalone output — no npm / next build on the server.
# Build context must be the `prebuilt/` directory:
# standalone/ ← contents of .next/standalone (includes .next/BUILD_ID + node_modules)
# static/ ← contents of .next/static
# public/ ← public/
FROM node:22-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
ENV PORT=3000
ENV HOSTNAME=0.0.0.0
RUN addgroup --system --gid 1001 nodejs \
&& adduser --system --uid 1001 nextjs
COPY --chown=nextjs:nodejs standalone/ ./
COPY --chown=nextjs:nodejs public ./public
COPY --chown=nextjs:nodejs static ./.next/static
USER nextjs
EXPOSE 3000
CMD ["node", "server.js"]