dishDecode / Dockerfile
GoodML's picture
changed configurations for quart
04d660b verified
raw
history blame
1.05 kB
# FROM python:3.9
# RUN useradd -m -u 1000 user
# USER user
# ENV PATH="/home/user/.local/bin:$PATH"
# WORKDIR /app
# COPY --chown=user ./requirements.txt requirements.txt
# RUN pip install --no-cache-dir --upgrade -r requirements.txt
# COPY --chown=user . /app
# # CMD ["gunicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
# CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]
FROM python:3.9
# Create a user for running the application
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
# Set the working directory for your app inside the container
WORKDIR /app
# Copy requirements.txt and install dependencies
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Install Hypercorn for Quart
RUN pip install hypercorn
# Copy the rest of the application files into the container
COPY --chown=user . /app
# Run the Quart app with Hypercorn, binding it to all interfaces on port 8000
CMD ["hypercorn", "app:app", "--bind", "0.0.0.0:8000"]