aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2017-05-02 00:47:51 +0100
committerStephen Finucane <stephen@that.guru>2017-05-04 11:33:30 +0100
commit150f6150b813b5cc45eb2e7ebb719a216329e160 (patch)
tree5806b70c85dd74c95ffaa20ac557549682163c3c
parent27f4b4284bdd410fe9b6a465de802d3b8bc99e45 (diff)
downloadpatchwork-150f6150b813b5cc45eb2e7ebb719a216329e160.tar
patchwork-150f6150b813b5cc45eb2e7ebb719a216329e160.tar.gz
lib: Update uWSGI, nginx config files
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>
-rw-r--r--lib/nginx/patchwork.conf46
-rw-r--r--lib/uwsgi/patchwork.ini3
2 files changed, 13 insertions, 36 deletions
diff --git a/lib/nginx/patchwork.conf b/lib/nginx/patchwork.conf
index 1e69d1a..893589b 100644
--- a/lib/nginx/patchwork.conf
+++ b/lib/nginx/patchwork.conf
@@ -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;
}
}
diff --git a/lib/uwsgi/patchwork.ini b/lib/uwsgi/patchwork.ini
index 04a9837..d67837c 100644
--- a/lib/uwsgi/patchwork.ini
+++ b/lib/uwsgi/patchwork.ini
@@ -1,6 +1,7 @@
[uwsgi]
-plugins = python27
+# change this to python3 if running Patchwork under Python 2.7
+plugins = python3
project = patchwork
base = /opt