Jonell01 commited on
Commit
c563042
·
verified ·
1 Parent(s): fcd9c93

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -7
Dockerfile CHANGED
@@ -1,16 +1,20 @@
1
- FROM node:18 # Change to your required base image
 
2
 
 
3
  WORKDIR /app
4
 
5
- # Clone your repository from GitHub
6
  RUN git clone https://github.com/jonellcc/jonellccprojectsapis.git /app
7
 
8
- # Change to the repo directory
9
  WORKDIR /app
10
 
11
- # Install dependencies if needed
12
- RUN npm install # Remove if not using Node.js
13
 
14
- # Expose port and start the server
15
  EXPOSE 8080
16
- CMD ["node", "index.js"] # Change this to your main script
 
 
 
1
+ # Use Node.js 18 as the base image
2
+ FROM node:18
3
 
4
+ # Set the working directory inside the container
5
  WORKDIR /app
6
 
7
+ # Clone your GitHub repository
8
  RUN git clone https://github.com/jonellcc/jonellccprojectsapis.git /app
9
 
10
+ # Change to the cloned repository directory
11
  WORKDIR /app
12
 
13
+ # Install dependencies (if using Node.js)
14
+ RUN npm install # Remove this if your project doesn't use npm
15
 
16
+ # Expose the necessary port (modify based on your API)
17
  EXPOSE 8080
18
+
19
+ # Start the server (modify according to your project's entry point)
20
+ CMD ["node", "index.js"] # Change to your actual start file