Add Dockerfile and .dockerignore for Portainer build
This commit is contained in:
parent
607add2a7b
commit
b7ae5c915f
6
.dockerignore
Normal file
6
.dockerignore
Normal file
@ -0,0 +1,6 @@
|
||||
node_modules
|
||||
npm-debug.log
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
.next
|
||||
|
||||
24
Dockerfile
Normal file
24
Dockerfile
Normal 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"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user