diff --git a/docker-compose/django/start b/docker-compose/django/start index b6c72b0c..eaec4f17 100755 --- a/docker-compose/django/start +++ b/docker-compose/django/start @@ -10,3 +10,8 @@ set -o nounset # Don't auto-migrate locally because this can cause weird issues when testing migrations # python manage.py migrate python manage.py runserver 0.0.0.0:5000 + +# In production, we use gunicorn +# This gets us close to that setting for development and testing +# https://docs.gunicorn.org/en/stable/settings.html +#gunicorn config.wsgi --bind 0.0.0.0:5000 --reload --log-file - --access-logfile - diff --git a/requirements/production.in b/requirements/production.in index 364755c9..93cca0b7 100644 --- a/requirements/production.in +++ b/requirements/production.in @@ -1,7 +1,11 @@ -r base.in # Gunicorn is the WSGI server used to run Django -gunicorn +# For an app where the vast majority of requests are I/O bound API requests +# gevent may be a good choice for increased concurrency +# https://docs.gunicorn.org/en/stable/design.html#choosing-a-worker-type +# https://docs.gunicorn.org/en/stable/settings.html#worker-class +gunicorn[gevent] # Database driver # https://www.psycopg.org/psycopg3/docs/basic/install.html diff --git a/requirements/production.txt b/requirements/production.txt index 26511af3..0d45060b 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -120,7 +120,11 @@ frozenlist==1.8.0 # aiosignal geoip2==5.1.0 # via -r base.in -gunicorn==23.0.0 +gevent==25.9.1 + # via gunicorn +greenlet==3.2.4 + # via gevent +gunicorn[gevent]==23.0.0 # via -r production.in hiredis==3.3.0 # via redis @@ -156,9 +160,9 @@ propcache==0.4.1 # via # aiohttp # yarl -psycopg[binary,pool]==3.2.10 +psycopg[binary,pool]==3.2.11 # via -r production.in -psycopg-binary==3.2.10 +psycopg-binary==3.2.11 # via psycopg psycopg-pool==3.2.6 # via psycopg @@ -185,7 +189,7 @@ requests==2.32.5 # django-slack # geoip2 # stripe -sentry-sdk==2.42.0 +sentry-sdk==2.42.1 # via -r production.in six==1.17.0 # via python-dateutil @@ -234,3 +238,10 @@ whitenoise==6.11.0 # via -r base.in yarl==1.22.0 # via aiohttp +zope-event==6.0 + # via gevent +zope-interface==8.0.1 + # via gevent + +# The following packages are considered to be unsafe in a requirements file: +# setuptools