forked from kubestellar/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 679 Bytes
/
Dockerfile
File metadata and controls
30 lines (22 loc) · 679 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# ============================================================
# 🧱 Runtime Image (uses prebuilt Next.js output)
# ============================================================
FROM node:20-alpine AS runtime
# Set working directory
WORKDIR /app
# Copy dependency files (for runtime only)
COPY package.json package-lock.json* ./
# Install production dependencies
RUN npm ci --omit=dev
# Copy prebuilt Next.js app from CI build artifacts
COPY .next/ .next/
COPY public/ public/
COPY next.config.* ./
COPY package.json ./
# Environment variables
ENV NODE_ENV=production
ENV PORT=3000
# Expose the Next.js port
EXPOSE 3000
# Start the production server
CMD ["npm", "start"]