File size: 994 Bytes
d607d39
 
 
 
 
 
 
 
 
 
 
 
3c1d9a9
6511cb3
 
3c1d9a9
d607d39
3c1d9a9
 
d607d39
6dad69d
3c1d9a9
d607d39
3c1d9a9
 
6dad69d
 
 
3c1d9a9
 
ac58193
d607d39
6511cb3
 
 
d607d39
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Use an official Python runtime as the base image
FROM python:3.9

# Set the working directory in the container
WORKDIR /app

# Copy the requirements file to the working directory
COPY requirements.txt .

# Install the Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Install Node.js and npm
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
    apt-get install -y nodejs

# Copy the package.json and package-lock.json files to the working directory
COPY package*.json ./

# Install the Node.js dependencies
RUN npm install

# Copy the Flask application code to the working directory
COPY . .

# Copy the public directory (if exists)
COPY public /app/public

# Build the React application
RUN npm run build
RUN npm install reactflow

# Verify Node.js and npm installation
RUN node --version && npm --version

# Expose the port on which the Flask application will run
EXPOSE 7860

# Set the command to run the Flask application
CMD ["python", "app.py"]