Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Replace whitenoise with uwsgi's static-map

Patryk Zawadzki4499e53389b6
diff --git a/requirements.in b/requirements.in
index 52053a32f7..d11c84f0a2 100644
--- a/requirements.in
+++ b/requirements.in
@@ -34,4 +34,3 @@ requests>=1.2.0
satchless>=1.1.2,<1.2a0
unidecode
uwsgi>=2.0.0
-whitenoise
diff --git a/requirements.txt b/requirements.txt
index e9a66e8d96..749de3c09a 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -61,7 +61,6 @@ stripe==1.29.1 # via django-payments
suds-jurko==0.6 # via django-payments
unidecode==0.4.19
uwsgi==2.0.12
-whitenoise==2.0.6
xmltodict==0.9.2 # via django-payments
# The following packages are commented out because they are
diff --git a/saleor/wsgi/static.py b/saleor/wsgi/static.py
deleted file mode 100644
index c613e714f7..0000000000
--- a/saleor/wsgi/static.py
+++ /dev/null
@@ -1,9 +0,0 @@
-import os
-
-os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'saleor.settings')
-
-from django.core.wsgi import get_wsgi_application
-from whitenoise.django import DjangoWhiteNoise
-
-application = get_wsgi_application()
-application = DjangoWhiteNoise(application)
diff --git a/saleor/wsgi/uwsgi.ini b/saleor/wsgi/uwsgi.ini
index 75339a5b6d..74ba3ce808 100644
--- a/saleor/wsgi/uwsgi.ini
+++ b/saleor/wsgi/uwsgi.ini
@@ -2,5 +2,6 @@
die-on-term = true
http-socket = :$(PORT)
master = true
-module = saleor.wsgi.static:application
+module = saleor.wsgi:application
processes = 4
+static-map = /static=/app/static