Skip to content

Commit 392edca

Browse files
committed
chore: migrate from uwsgi to gunicorn
1 parent 7ee7f3e commit 392edca

File tree

5 files changed

+4
-12
lines changed

5 files changed

+4
-12
lines changed

Diff for: Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ ENV HOME=/home/emeis
1616
ENV PYTHONUNBUFFERED=1
1717
ENV DJANGO_SETTINGS_MODULE emeis.settings
1818
ENV APP_HOME=/app
19-
ENV UWSGI_INI /app/uwsgi.ini
2019

2120
ARG REQUIREMENTS=requirements-prod.txt
2221
COPY requirements-base.txt requirements-prod.txt requirements-dev.txt $APP_HOME/
@@ -28,4 +27,4 @@ COPY . $APP_HOME
2827

2928
EXPOSE 8000
3029

31-
CMD /bin/sh -c "wait-for-it.sh $DATABASE_HOST:${DATABASE_PORT:-5432} -- ./manage.py migrate && uwsgi"
30+
CMD /bin/sh -c "wait-for-it.sh $DATABASE_HOST:${DATABASE_PORT:-5432} -- ./manage.py migrate && gunicorn --workers 10 --access-logfile - --limit-request-line 16384 --bind :8000 emeis.wsgi"

Diff for: emeis/wsgi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
WSGI config for project_app2 project.
2+
WSGI config for emeis project.
33
44
It exposes the WSGI callable as a module-level variable named ``application``.
55

Diff for: requirements-base.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ django-localized-fields==6.7
77
django-postgres-extra==2.0.8
88
djangorestframework==3.14.0
99
djangorestframework-jsonapi==6.1.0
10+
gunicorn==23.0.0
1011
mozilla-django-oidc==3.0.0
1112
pyexcel==0.7.0
1213
pyexcel-xlsx==0.6.0
1314
requests==2.31.0
14-
uwsgi==2.0.23
1515
openpyxl==3.0.10 # TODO: dependency of `pyexcel-xlsx` Remove as soon as https://github.com/pyexcel/pyexcel-xlsx/issues/52 is resolved.

Diff for: setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444
"django-postgres-extra<3",
4545
"djangorestframework>=3.12.4,<4",
4646
"djangorestframework-jsonapi>=4.3.0,<=6.1.0",
47+
"gunicorn~=23.0.0",
4748
"mozilla-django-oidc<=3",
4849
"pyexcel>0.6,<1",
4950
"pyexcel-xlsx>=0.6.0,<1",
5051
"psycopg2>=2.9,<3",
5152
"requests<3",
52-
"uwsgi<3",
5353
"openpyxl<4",
5454
],
5555
)

Diff for: uwsgi.ini

-7
This file was deleted.

0 commit comments

Comments
 (0)