Skip to content

Commit

Permalink
Update Dockerfile to use poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
homanp committed Feb 22, 2024
1 parent 4e43556 commit ee39611
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ WORKDIR /usr/src/app
# Copy the current directory contents into the container at /usr/src/app
COPY . /usr/src/app

# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Install Poetry
RUN pip install --no-cache-dir poetry

# Use Poetry to install dependencies
RUN poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-ansi

# Make port 80 available to the world outside this container
ENV PORT="8080"

# Run app.py when the container launches
CMD exec gunicorn --bind :$PORT --workers 2 --timeout 0 --worker-class uvicorn.workers.UvicornWorker --threads 8 main:app
CMD exec gunicorn --bind :$PORT --workers 2 --timeout 0 --worker-class uvicorn.workers.UvicornWorker --threads 8 main:app

0 comments on commit ee39611

Please sign in to comment.