File size: 699 Bytes
45b9bf0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.9

# Install Node.js
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get install -y nodejs

# Set working directory
WORKDIR /code

# Copy Python requirements file and install dependencies
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

# Copy Node.js application files
COPY ./index.js /code/index.js
COPY ./package.json /code/package.json
COPY ./package-lock.json /code/package-lock.json

# Install Node.js dependencies
RUN npm install

# Copy Python application files
COPY . .

# Start both Python and Node.js applications
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860" ]