Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Aakibgithuber authored Feb 29, 2024
1 parent c279396 commit 70d52b5
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
# Use Node.js LTS version as the base image
# Use Node.js 16 slim as the base image
FROM node:16

# Set the working directory in the container
# Set the working directory
WORKDIR /app

# Copy package.json and package-lock.json to the container
COPY package.json /app/
# Copy package.json and package-lock.json to the working directory
COPY package*.json ./

# Install project dependencies
# Install dependencies
RUN npm install

# Copy the entire project files to the container
COPY . /app/
# Copy the rest of the application code
COPY . .

# Build the Next.js application for production
# Build the React app
RUN npm run build

# Expose the port used by your Next.js app (if needed)
# Expose port 3000 (or the port your app is configured to listen on)
EXPOSE 3000

# Define the default command to start the Next.js app
# Start your Node.js server (assuming it serves the React app)
CMD ["npm", "start"]

0 comments on commit 70d52b5

Please sign in to comment.