Files
codex a2dbb33693
Deploy Next.js site to Pages / build (push) Has been cancelled
Deploy Next.js site to Pages / deploy (push) Has been cancelled
CHORE: Added k3s deployment architecture (Dockerfile and k8s.yaml)
2026-06-03 04:50:50 +00:00

16 lines
429 B
Docker

# Step 1: Build the static Next.js application
FROM node:20-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
# Step 2: Serve the static files with NGINX
FROM nginx:alpine
# Copy the static export from Next.js (the 'out' folder) to the NGINX html directory
COPY --from=builder /app/out /usr/share/nginx/html
# Expose port 80
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]