Spaces:
Sleeping
Sleeping
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" ] | |