Parcourir la source

Upgrade whitenoise to 5.0.x for Django 3.0 compatibility

Matt Westcott il y a 5 ans
Parent
commit
de6876d452
4 fichiers modifiés avec 3 ajouts et 8 suppressions
  1. 1 1
      Dockerfile
  2. 1 1
      Procfile
  3. 0 5
      bakerydemo/wsgi_production.py
  4. 1 1
      requirements/production.txt

+ 1 - 1
Dockerfile

@@ -45,7 +45,7 @@ EXPOSE 8000
 ENV DJANGO_SETTINGS_MODULE=bakerydemo.settings.production DJANGO_DEBUG=off
 
 # Tell uWSGI where to find your wsgi file:
-ENV UWSGI_WSGI_FILE=bakerydemo/wsgi_production.py
+ENV UWSGI_WSGI_FILE=bakerydemo/wsgi.py
 
 # Base uWSGI configuration (you shouldn't need to change these):
 ENV UWSGI_VIRTUALENV=/venv UWSGI_HTTP=:8000 UWSGI_MASTER=1 UWSGI_HTTP_AUTO_CHUNKED=1 UWSGI_HTTP_KEEPALIVE=1 UWSGI_UID=1000 UWSGI_GID=2000 UWSGI_LAZY_APPS=1 UWSGI_WSGI_ENV_BEHAVIOR=holy

+ 1 - 1
Procfile

@@ -1,2 +1,2 @@
 release: yes "yes" | python manage.py migrate
-web: uwsgi --http-socket=:$PORT --master --workers=2 --threads=8 --die-on-term --wsgi-file=bakerydemo/wsgi_production.py  --static-map /media/=/app/bakerydemo/media/ --offload-threads 1
+web: uwsgi --http-socket=:$PORT --master --workers=2 --threads=8 --die-on-term --wsgi-file=bakerydemo/wsgi.py  --static-map /media/=/app/bakerydemo/media/ --offload-threads 1

+ 0 - 5
bakerydemo/wsgi_production.py

@@ -1,5 +0,0 @@
-from django.core.wsgi import get_wsgi_application
-from whitenoise.django import DjangoWhiteNoise
-
-application = get_wsgi_application()
-application = DjangoWhiteNoise(application)

+ 1 - 1
requirements/production.txt

@@ -6,7 +6,7 @@ elasticsearch==2.4.1
 dj-database-url==0.4.1
 uwsgi>=2.0.17,<2.1
 psycopg2>=2.7,<3.0
-whitenoise==3.2.2
+whitenoise>=5.0,<5.1
 boto3==1.9.189
 google-cloud-storage==1.20.0
 django-storages==1.7.2