From 0ff5e11b26a284eab2bbab3dff027ec76d1b52aa Mon Sep 17 00:00:00 2001 From: Ismail Pelaseyed Date: Thu, 22 Feb 2024 09:55:25 -0800 Subject: [PATCH] Fix issue with Dockerfile running in virtual env --- Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index f73e3c20..1207c1cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ No newline at end of file +CMD ["poetry", "run", "gunicorn", "--bind", ":8080", "--workers", "2", "--timeout", "0", "--worker-class", "uvicorn.workers.UvicornWorker", "--threads", "8", "main:app"] \ No newline at end of file