abubasith86 commited on
Commit
177c7a4
·
1 Parent(s): 8519250
Files changed (1) hide show
  1. Dockerfile +3 -7
Dockerfile CHANGED
@@ -3,21 +3,17 @@ FROM node:23.7.0 as builder
3
  # Install git
4
  RUN apt-get update && apt-get install -y git
5
 
6
- # Clone the GitHub repository
7
  RUN rm -rf /usr/src/app && git clone https://github.com/abubasith456/Node-WLA.git /usr/src/app
8
 
9
  # Set the working directory
10
  WORKDIR /usr/src/app
11
 
12
- RUN git pull
13
-
14
  # Install npm dependencies
15
  RUN npm install
16
 
17
- RUN npm ci
18
-
19
  # Expose the port your application runs on
20
  EXPOSE 5000
21
 
22
- # Start the application
23
- CMD ["npm", "start"]
 
3
  # Install git
4
  RUN apt-get update && apt-get install -y git
5
 
6
+ # Clone the GitHub repository (if not already cloned)
7
  RUN rm -rf /usr/src/app && git clone https://github.com/abubasith456/Node-WLA.git /usr/src/app
8
 
9
  # Set the working directory
10
  WORKDIR /usr/src/app
11
 
 
 
12
  # Install npm dependencies
13
  RUN npm install
14
 
 
 
15
  # Expose the port your application runs on
16
  EXPOSE 5000
17
 
18
+ # Ensure that the latest code is pulled before starting the app
19
+ CMD git pull origin main && npm install && npm start