summaryrefslogtreecommitdiff
path: root/lib/uwsgi
diff options
context:
space:
mode:
authorStephen Finucane <stephen.finucane@intel.com>2016-02-02 23:44:34 +0000
committerStephen Finucane <stephen.finucane@intel.com>2016-02-14 16:24:08 +0000
commitab05e55a08ded11c6e5b58dc91ba33087d9a2278 (patch)
tree385394f3a73dbc60ba2ce8b521d93e0bf2352a6a /lib/uwsgi
parent2ad82b755b245e2297856cdbbcf1a3a31025682b (diff)
downloadpatchwork-ab05e55a08ded11c6e5b58dc91ba33087d9a2278.tar
patchwork-ab05e55a08ded11c6e5b58dc91ba33087d9a2278.tar.gz
lib: Add nginx and uWSGI configuration files
nginx and uWSGI are a well-known option for deploying Django applications today - might as well embrace them. Conversely, the mod_python variable and fastcgi service are both deprecated and should not be used. Remove these. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com> Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Diffstat (limited to 'lib/uwsgi')
-rw-r--r--lib/uwsgi/patchwork.ini24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/uwsgi/patchwork.ini b/lib/uwsgi/patchwork.ini
new file mode 100644
index 0000000..4f5dc90
--- /dev/null
+++ b/lib/uwsgi/patchwork.ini
@@ -0,0 +1,24 @@
+[uwsgi]
+
+project = patchwork
+base = /opt
+user = www-data
+group = www-data
+
+chdir = %(base)/%(project)
+pythonpath = %(base)/%(project)
+module = %(project).wsgi:application
+
+master = true
+processes = 5
+# increase buffer size to avoid "502 bad gateway error"
+# "recv() failed (104: Connection reset by peer) while reading response header from upstream"
+buffer-size = 16384
+
+uid = %(user)
+gid = %(group)
+
+daemonize = /var/log/%(project).log
+socket = /run/uwsgi/%(project).sock
+chmod-socket = 660
+vacuum = true