Skip to content

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

Switch to uwsgi

Patryk Zawadzki7ebb1bd489a5
diff --git a/Procfile b/Procfile
index 35b94e05cf..4b4cd31b74 100644
--- a/Procfile
+++ b/Procfile
@@ -1 +1 @@
-web: gunicorn saleor.wsgi.static --log-file -
\ No newline at end of file
+web: uwsgi saleor/wsgi/uwsgi.ini
diff --git a/app.json b/app.json
index a1df6562fb..511873b7d7 100644
--- a/app.json
+++ b/app.json
@@ -6,7 +6,6 @@
"logo": "https://mirumee.com/img/opensource-saleor.png",
"keywords": ["saleor", "e-commerce", "django"],
"env": {
- "BUILDPACK_URL": "https://github.com/ddollar/heroku-buildpack-multi.git",
"DJANGO_SETTINGS_MODULE": "saleor.settings",
"ALLOWED_HOSTS": "*",
"DEBUG": "False",
@@ -35,5 +34,10 @@
},
"addons": [
"heroku-postgresql:hobby-dev"
+ ],
+ "buildpacks": [
+ {
+ "url": "https://github.com/ddollar/heroku-buildpack-multi.git"
+ }
]
-}
\ No newline at end of file
+}
diff --git a/requirements.in b/requirements.in
index 7109702341..beaefce8d6 100644
--- a/requirements.in
+++ b/requirements.in
@@ -14,7 +14,6 @@ django-selectable>=0.8.0
django-versatileimagefield>=1.0.1,<1.1a0
fake-factory>=0.3.2
google-measurement-protocol>=0.1.2,<0.2a0
-gunicorn>=19.2.1
jsonfield>=1.0.3
Markdown>=2.4
mock>=1.3.0
@@ -26,4 +25,5 @@ pytest-django
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 a326d6f6f6..29dcaa72dc 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -26,7 +26,6 @@ djangorestframework==3.1.3
fake-factory==0.5.3
funcsigs==0.4 # via mock
google-measurement-protocol==0.1.4
-gunicorn==19.3.0
jsonfield==1.0.3
lxml==3.5.0 # via premailer
markdown==2.6.4
@@ -49,5 +48,6 @@ six==1.10.0 # via mock, purl
stripe==1.27.1 # via django-payments
suds-jurko==0.6 # via django-payments
unidecode==0.4.18
+uwsgi==2.0.11.2
whitenoise==2.0.6
xmltodict==0.9.2 # via django-payments
diff --git a/saleor/wsgi/uwsgi.ini b/saleor/wsgi/uwsgi.ini
new file mode 100644
index 0000000000..75339a5b6d
--- /dev/null
+++ b/saleor/wsgi/uwsgi.ini
@@ -0,0 +1,6 @@
+[uwsgi]
+die-on-term = true
+http-socket = :$(PORT)
+master = true
+module = saleor.wsgi.static:application
+processes = 4