From e7dd6b39d699d9326874cd5f99dcaa6929c4d6d7 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 17 May 2016 18:30:43 -0400 Subject: Add uWSGI stuff. --- .gitignore | 1 + Makefile | 5 ++++- depends_static.txt | 9 +++++---- parabolaweb.conf | 8 +++++--- parabolaweb.ini.example | 12 ++++++++++++ 5 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 parabolaweb.ini.example diff --git a/.gitignore b/.gitignore index 21b81d8..8d83e4a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ parabolaweb* !parabolaweb*.in !parabolaweb*.c !parabolaweb.conf +!parabolaweb.ini.example diff --git a/Makefile b/Makefile index 295e940..14c397f 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,8 @@ libexecdir = $(exec_prefix)/lib #sysconfdir = $(prefix)/etc sysconfdir = /etc/conf.d systemddir = $(prefix)/lib/systemd/system +#uwsgidir = $(prefix)/etc/uwsgi +uwsgidir = /etc/uwsgi pkglibexecdir = $(libexecdir)/parabolaweb-utils pkgconffile = $(sysconfdir)/parabolaweb @@ -23,7 +25,8 @@ targets = \ $(sbindir)/parabolaweb-reporead-inotify \ $(sbindir)/parabolaweb-update \ $(pkglibexecdir)/parabolaweb-changepassword.real \ - $(systemddir)/parabolaweb-reporead-inotify.service + $(systemddir)/parabolaweb-reporead-inotify.service \ + $(uwsgidir)/parabolaweb.ini.example all: PHONY depends.txt $(notdir $(targets)) parabolaweb.conf diff --git a/depends_static.txt b/depends_static.txt index 0dd31b2..a27e211 100644 --- a/depends_static.txt +++ b/depends_static.txt @@ -1,4 +1,5 @@ -gitget # for parabolaweb-update -librelib # for libremessages, used in parabolaweb-update -postgresql # for database -python2 # duh +gitget # for parabolaweb-update +librelib # for libremessages, used in parabolaweb-update +postgresql # for database +python2 # duh +uwsgi-plugin-python2 # for uwsgi diff --git a/parabolaweb.conf b/parabolaweb.conf index 923e138..0b5cb6a 100644 --- a/parabolaweb.conf +++ b/parabolaweb.conf @@ -1,8 +1,10 @@ -WEBUSER=nobody -WEBDIR=/srv/http/web +# If you change WEBUSER or WEBDIR, you should also change +# /etc/uwsgi/parabolaweb.ini, if you use uWSGI. +WEBUSER=parabolaweb +WEBDIR=/srv/http/www.parabola.nu/web GITURL='git://projects.parabola.nu/parabolaweb.git#branch=master' RUNMAKE='pacman -Q parabolaweb-dev' -INOTIFYARGS=('/srv/ftp/%(repo)s/os/%(arch)s/') +INOTIFYARGS=('/srv/repo/main/%(repo)s/os/%(arch)s/') diff --git a/parabolaweb.ini.example b/parabolaweb.ini.example new file mode 100644 index 0000000..efe95f1 --- /dev/null +++ b/parabolaweb.ini.example @@ -0,0 +1,12 @@ +[uwsgi] +master = true +processes = 4 +threads = 2 + +socket = /run/uwsgi/%n.sock +chmod-socket = 770 +uid = %n +gid = http + +plugins = python2 +wsgi-file = /srv/http/www.parabola.nu/web/archweb.wsgi -- cgit v1.2.3