riddhiman commited on
Commit
f140cee
·
verified ·
1 Parent(s): 98f7f33

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -13
Dockerfile CHANGED
@@ -1,23 +1,20 @@
1
  # Use an official Node runtime as a parent image
2
  FROM node:20
3
 
4
- # Set the working directory in the container
5
- WORKDIR /usr/src/app
6
 
7
- # Copy package.json and package-lock.json (or npm-shrinkwrap.json) files
8
- COPY package*.json ./
9
 
10
- # Install any needed packages specified in package.json
11
- RUN npm install
12
 
13
- # Bundle the app's source code inside the Docker image
14
  COPY . .
15
 
16
- # Make port 3000 available to the world outside this container
17
- EXPOSE 7860
18
 
19
- # Define environment variable
20
- ENV NODE_ENV=production
21
-
22
- # Run the app when the container launches
23
  CMD ["node", "server.js"]
 
1
  # Use an official Node runtime as a parent image
2
  FROM node:20
3
 
4
+ # Set the working directory inside the container to /app.
5
+ WORKDIR /app
6
 
7
+ # Copy the package.json and package-lock.json (if available) files into the container.
8
+ COPY package.json package-lock.json* ./
9
 
10
+ # Install the project dependencies.
11
+ RUN npm install
12
 
13
+ # Copy the rest of the application code into the container.
14
  COPY . .
15
 
16
+ # Expose port 3000 to have it mapped by Docker daemon
17
+ EXPOSE 3000
18
 
19
+ # Command to run when starting the container
 
 
 
20
  CMD ["node", "server.js"]