The Blog rebuild

This commit is contained in:
Eli Winderickx
2025-12-13 07:12:14 +01:00
parent b9babf8cf0
commit 9db388dcc1
24 changed files with 49 additions and 12 deletions

30
Dockerfile Normal file
View File

@@ -0,0 +1,30 @@
# Use a lightweight Node.js image
FROM node:22-alpine AS builder
# Set the working directory
WORKDIR /app
# Copy package.json and install dependencies
COPY package*.json ./
RUN npm install
# Copy the rest of the application code
COPY . .
# Build the Next.js application
RUN npm run build
# Use a new image for the production environment
FROM node:22-alpine AS runner
# Set the working directory
WORKDIR /app
# Copy built files from the builder stage
COPY --from=builder /app ./
# Expose the application port
EXPOSE 3000
# Command to run the application
CMD ["npm", "start"]