CHORE: Added k3s deployment architecture (Dockerfile and k8s.yaml)
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
# 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;"]
|
||||
Reference in New Issue
Block a user