ruv commited on
Commit
d607d39
·
verified ·
1 Parent(s): 3c1d9a9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -4
Dockerfile CHANGED
@@ -1,14 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
  # Install Node.js and npm
2
- RUN apt-get update && apt-get install -y nodejs npm
 
3
 
4
- # Copy package.json and package-lock.json (if available)
5
  COPY package*.json ./
6
 
7
- # Install dependencies
8
  RUN npm ci --only=production
9
 
10
- # Copy the rest of the application code
11
  COPY . .
12
 
13
  # Build the React application
14
  RUN npm run build
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as the base image
2
+ FROM python:3.9
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Copy the requirements file to the working directory
8
+ COPY requirements.txt .
9
+
10
+ # Install the Python dependencies
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
  # Install Node.js and npm
14
+ RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
15
+ RUN apt-get install -y nodejs
16
 
17
+ # Copy the package.json and package-lock.json files to the working directory
18
  COPY package*.json ./
19
 
20
+ # Install the Node.js dependencies
21
  RUN npm ci --only=production
22
 
23
+ # Copy the Flask application code to the working directory
24
  COPY . .
25
 
26
  # Build the React application
27
  RUN npm run build
28
+
29
+ # Expose the port on which the Flask application will run
30
+ EXPOSE 7860
31
+
32
+ # Set the command to run the Flask application
33
+ CMD ["python", "app.py"]