feat(api): install gunicorn/uvicorn from pip

This commit is contained in:
jo 2023-05-10 14:51:23 +02:00 committed by Kyle Robbertze
parent 92b2a0d1e0
commit 3b4f9ef477
5 changed files with 6 additions and 7 deletions

View File

@ -151,7 +151,7 @@ WORKDIR /src
COPY api/requirements.txt . COPY api/requirements.txt .
RUN --mount=type=cache,target=/root/.cache/pip \ RUN --mount=type=cache,target=/root/.cache/pip \
pip install --no-compile gunicorn uvicorn -r requirements.txt pip install --no-compile -r requirements.txt
COPY --from=python-builder /build/shared/*.whl . COPY --from=python-builder /build/shared/*.whl .
RUN --mount=type=cache,target=/root/.cache/pip \ RUN --mount=type=cache,target=/root/.cache/pip \

View File

@ -23,7 +23,7 @@ Environment=LIBRETIME_LOG_FILEPATH=@@LOG_DIR@@/api.log
Type=notify Type=notify
KillMode=mixed KillMode=mixed
ExecStart=/usr/bin/gunicorn \ ExecStart=/usr/local/bin/gunicorn \
--workers 4 \ --workers 4 \
--worker-class uvicorn.workers.UvicornWorker \ --worker-class uvicorn.workers.UvicornWorker \
--log-file - \ --log-file - \

View File

@ -2,11 +2,6 @@
[python] [python]
python3 = focal, bullseye python3 = focal, bullseye
python3-pip = focal, bullseye python3-pip = focal, bullseye
gunicorn = focal, bullseye
python3-gunicorn = focal, bullseye
python3-uvicorn = focal, bullseye
python3-httptools = focal, bullseye
python3-uvloop = focal, bullseye
[psycopg2] [psycopg2]
# See https://www.psycopg.org/docs/install.html#install-from-source # See https://www.psycopg.org/docs/install.html#install-from-source

View File

@ -5,5 +5,7 @@ django-filter>=2.4.0,<23.3
django>=4.2.0,<4.3 django>=4.2.0,<4.3
djangorestframework @ git+https://github.com/encode/django-rest-framework@38a74b42da10576857d6bf8bd82a73b15d12a7ed djangorestframework @ git+https://github.com/encode/django-rest-framework@38a74b42da10576857d6bf8bd82a73b15d12a7ed
drf-spectacular>=0.22.1,<0.27 drf-spectacular>=0.22.1,<0.27
gunicorn>=20.1.0,<20.2
psycopg[c]>=3.1.8,<3.2 psycopg[c]>=3.1.8,<3.2
requests>=2.25.1,<2.31 requests>=2.25.1,<2.31
uvicorn[standard]>=0.17.6,<0.23.0

View File

@ -33,7 +33,9 @@ setup(
], ],
extras_require={ extras_require={
"prod": [ "prod": [
"gunicorn>=20.1.0,<20.2",
"psycopg[c]>=3.1.8,<3.2", "psycopg[c]>=3.1.8,<3.2",
"uvicorn[standard]>=0.17.6,<0.23.0",
], ],
"dev": [ "dev": [
"django-coverage-plugin>=3.0.0,<3.1", "django-coverage-plugin>=3.0.0,<3.1",