Skip to content

Commit

Permalink
Fix issue with Dockerfile running in virtual env
Browse files Browse the repository at this point in the history
  • Loading branch information
homanp committed Feb 22, 2024
1 parent b27e956 commit 0ff5e11
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ COPY pyproject.toml poetry.lock ./
# Install the required packages of the application
RUN poetry install --no-root && rm -rf $POETRY_CACHE_DIR

# Install gunicorn
RUN pip install gunicorn

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

# Run main.py when the container launches
RUN gunicorn --bind :$PORT --workers 2 --timeout 0 --worker-class uvicorn.workers.UvicornWorker --threads 8 main:app
CMD ["poetry", "run", "gunicorn", "--bind", ":8080", "--workers", "2", "--timeout", "0", "--worker-class", "uvicorn.workers.UvicornWorker", "--threads", "8", "main:app"]

0 comments on commit 0ff5e11

Please sign in to comment.