moahmedwafy commited on
Commit
9ea5a36
·
1 Parent(s): 94cf057

update: dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -3
Dockerfile CHANGED
@@ -1,6 +1,9 @@
1
  # Use the official Node.js v18 image as the base image
2
  FROM node:18
3
 
 
 
 
4
  # Set the working directory inside the container
5
  WORKDIR /app
6
 
@@ -17,7 +20,7 @@ COPY . .
17
  RUN rm -f -- .env
18
 
19
  # Build the TypeScript code
20
- #RUN npm run build
21
 
22
  # Set the PORT environment variable
23
  ENV PORT=7860
@@ -25,9 +28,11 @@ ARG JWT_SECRET
25
  ARG JWT_EXPIRES_IN
26
  ARG DB_URI
27
 
 
 
 
28
  # Expose the port on which your application will run
29
  EXPOSE $PORT
30
 
31
  # Command to run the application
32
- #CMD ["node", "dist/index.js"]
33
- CMD ["npm", "run", "start:dev"]
 
1
  # Use the official Node.js v18 image as the base image
2
  FROM node:18
3
 
4
+ # install python3 and pip
5
+ RUN apt-get update && apt-get install -y python3 python3-pip
6
+
7
  # Set the working directory inside the container
8
  WORKDIR /app
9
 
 
20
  RUN rm -f -- .env
21
 
22
  # Build the TypeScript code
23
+ RUN npm run build
24
 
25
  # Set the PORT environment variable
26
  ENV PORT=7860
 
28
  ARG JWT_EXPIRES_IN
29
  ARG DB_URI
30
 
31
+ # install python dependencies
32
+ RUN pip3 install -r requirements.txt
33
+
34
  # Expose the port on which your application will run
35
  EXPOSE $PORT
36
 
37
  # Command to run the application
38
+ CMD "python3 models-server/server.py & node dist/index.js"