]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
lib: Update uWSGI, nginx config files
authorStephen Finucane <stephen@that.guru>
Mon, 1 May 2017 23:47:51 +0000 (00:47 +0100)
committerStephen Finucane <stephen@that.guru>
Thu, 4 May 2017 10:33:30 +0000 (11:33 +0100)
The nginx file was a replacement for '/etc/nginx/nginx.conf' instead of
a "site" file, while the uWSGI file referenced the Python 2 plugin
despite the sample deployment guide, which uses this, being Python
3-based. Correct both issues.

Signed-off-by: Stephen Finucane <stephen@that.guru>
lib/nginx/patchwork.conf
lib/uwsgi/patchwork.ini

index 1e69d1a9239840ac55cd2ffbe4ea40e0291148b3..893589bdcca06f51e1276003b077d8de62f4dfc6 100644 (file)
@@ -1,40 +1,16 @@
-user www-data;
-worker_processes 4;
-pid /var/run/nginx.pid;
+server {
+    listen 80 default_server;
+    listen [::]:80 default_server;
 
-events {
-    worker_connections 768;
-}
-
-http {
-    tcp_nopush on;
-    tcp_nodelay on;
-    keepalive_timeout 65;
-    types_hash_max_size 2048;
-
-    gzip on;
-    gzip_proxied any;
-    gzip_types text/plain text/css text/javascript application/x-javascript
-               text/xml application/xml image/svg+xml
-               application/vnd.ms-fontobject application/x-font-ttf font/opentype;
-
-    include /etc/nginx/mime.types;
-    default_type application/octet-stream;
+    location = favicon.ico { access_log off; log_not_found off; }
 
-    access_log /var/log/nginx/access.log;
-    error_log /var/log/nginx/error.log;
-
-    server {
-        location = favicon.ico { access_log off; log_not_found off; }
-
-        location /static {
-            alias /var/www/patchwork;
-            expires 3h;
-        }
+    location /static {
+        alias /var/www/patchwork;
+        expires 3h;
+    }
 
-        location / {
-            include uwsgi_params;
-            uwsgi_pass unix:/run/uwsgi/patchwork.sock;
-        }
+    location / {
+        include uwsgi_params;
+        uwsgi_pass unix:/run/uwsgi/patchwork.sock;
     }
 }
index 04a9837bd2ca4b3b683e848a4489206cc7f9a486..d67837cbacda295fb71743e354760e6401e55c73 100644 (file)
@@ -1,6 +1,7 @@
 [uwsgi]
 
-plugins = python27
+# change this to python3 if running Patchwork under Python 2.7
+plugins = python3
 
 project = patchwork
 base = /opt