Изменил докер

This commit is contained in:
urec56 2024-08-19 21:15:45 +04:00
parent a1397f2f10
commit 1577ad4d45
2 changed files with 6 additions and 13 deletions

View file

@ -10,15 +10,11 @@ RUN apt-get update \
&& apt-get -y install curl gcc libpq-dev \ && apt-get -y install curl gcc libpq-dev \
&& apt-get clean && apt-get clean
RUN pip install --upgrade pip setuptools
COPY requirements.txt . COPY requirements.txt .
RUN pip config set global.trusted-host "pypi.python.org pypi.org files.pythonhosted.org" && \ RUN pip config set global.trusted-host "pypi.python.org pypi.org files.pythonhosted.org" && \
pip install \ pip install --upgrade pip setuptools \
--proxy= \ pip install -r requirements.txt
-r requirements.txt
COPY . . COPY . .
@ -26,5 +22,6 @@ RUN chown -R app:app $APP_HOME
USER app USER app
CMD ["gunicorn", "app.main:app", "--workers", "1", "--worker-class", "uvicorn.workers.UvicornWorker", "--bind=0.0.0.0:8000"] CMD ["gunicorn", "app.main:app", "--workers", "2", "--worker-class", "uvicorn.workers.UvicornWorker",\
"--bind=0.0.0.0:8000", "--max-requests", "500", "--max-requests-jitter", "50"]

View file

@ -10,15 +10,11 @@ RUN apt-get update \
&& apt-get -y install curl gcc libpq-dev \ && apt-get -y install curl gcc libpq-dev \
&& apt-get clean && apt-get clean
RUN pip install --upgrade pip setuptools
COPY requirements.txt . COPY requirements.txt .
RUN pip config set global.trusted-host "pypi.python.org pypi.org files.pythonhosted.org" && \ RUN pip config set global.trusted-host "pypi.python.org pypi.org files.pythonhosted.org" && \
pip install \ pip install --upgrade pip setuptools \
--proxy= \ pip install -r requirements.txt
-r requirements.txt
COPY . . COPY . .