Add Dockerfile and .dockerignore for Portainer build

This commit is contained in:
Gert-Jan Aalderink 2025-07-09 21:36:14 +02:00
parent 607add2a7b
commit b7ae5c915f
2 changed files with 30 additions and 0 deletions

6
.dockerignore Normal file
View File

@ -0,0 +1,6 @@
node_modules
npm-debug.log
Dockerfile
.dockerignore
.next

24
Dockerfile Normal file
View File

@ -0,0 +1,24 @@
# Use official Node.js image
FROM node:20
# Create app directory
WORKDIR /app
# Copy dependency files
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy rest of the app
COPY . .
# Build the Next.js app
RUN npm run build
# Expose default Next.js port
EXPOSE 3000
# Start the server
CMD ["npm", "start"]