From 2ca2c09fa1b08e9c7e44072fc4c61030c0d3efc8 Mon Sep 17 00:00:00 2001 From: GabrielBarberini Date: Sat, 27 Jan 2024 23:41:05 -0300 Subject: [PATCH] reduces the amount of uvicorn workers to 2 --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index d990f5d..9084d20 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,18 +2,18 @@ FROM python:3.11-slim-bookworm EXPOSE 3000 -WORKDIR /code +WORKDIR /app -COPY ./requirements.txt /code/requirements.txt +COPY ./requirements.txt /app/requirements.txt RUN apt-get update && \ apt-get install -y --no-install-recommends git && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* && \ - pip3 install --no-cache-dir --upgrade -r /code/requirements.txt && \ + pip3 install --no-cache-dir --upgrade -r /app/requirements.txt && \ apt-get purge -y --auto-remove && \ rm -rf /var/lib/apt/lists/* -COPY ./lib /code/lib +COPY ./lib /app/lib -CMD ["gunicorn", "-w 4", "-k", "uvicorn.workers.UvicornWorker", "lib:app", "--log-level", "Debug", "-b", "0.0.0.0:3000", "--timeout", "120"] +CMD ["gunicorn", "-w 2", "-k", "uvicorn.workers.UvicornWorker", "lib:app", "--log-level", "Debug", "-b", "0.0.0.0:3000", "--timeout", "120"]