Files
CICD/Dockerfile
SpecialX 4bd5c687bc
Some checks failed
CI / build-and-test (push) Successful in 1m18s
CI / deploy (push) Failing after 3s
feat: setup standalone build and docker deployment
2025-12-18 17:16:39 +08:00

23 lines
497 B
Docker

FROM node:22-alpine AS runner
WORKDIR /app
ENV NODE_ENV production
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
# Copy standalone output
# We assume the context contains the .next folder and public folder from the artifacts
COPY --chown=nextjs:nodejs .next/standalone ./
COPY --chown=nextjs:nodejs .next/static ./.next/static
COPY --chown=nextjs:nodejs public ./public
USER nextjs
EXPOSE 3000
ENV PORT 3000
ENV HOSTNAME "0.0.0.0"
CMD ["node", "server.js"]