From ed13bd129a85d8133137086adba56649b395444a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 13 Jul 2016 05:20:54 +0000 Subject: add certbot and uwsgi configs --- config-uwsgi.PKGBUILD | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 config-uwsgi.PKGBUILD (limited to 'config-uwsgi.PKGBUILD') diff --git a/config-uwsgi.PKGBUILD b/config-uwsgi.PKGBUILD new file mode 100644 index 0000000..663f00c --- /dev/null +++ b/config-uwsgi.PKGBUILD @@ -0,0 +1,61 @@ +. ${BUILDFILE%/*}/common.sh +pkgver=20160713 + +depends=(uwsgi) + +package() { +cd "$pkgdir" + +# Wherever possible, we should use uWSGI for process management of our +# HTTP services. This allows for much more consistent management and +# configuration than the hodge-podge of PHP-FPM, manage.py, fcgiwrap, +# et c. that we used to have on Proton. + +# uWSGI is the program, uwsgi is the protocol it speaks with nginx. A +# pool of workers is called a vassal, and is configured in +# `/etc/uwsgi/${vassal}.ini`, and activated by +# `uwsgi@${vassal}.socket`; a socket speaking the uwsgi protocol is +# created at `/var/run/uwsgi/${vassal}.sock`. + +# We use systemd socket activation rather than a uWSGI emperor because +# they provide largely the same functionality; the only real advantage +# that a uWSGI emperor would provide over systemd socket activation is +# if you ran it in tyrant mode, it lets you do some cool things with +# unpriveleged access, which would be useful for a shared web host. +# We aren't a shared web host, and have no reason to run emperor in +# tyrant mode. + +# Since the `uwsgi@.service` vassal unit is written to support +# socket-activated or non-socket-activated use, it is normally +# possible to accidentally start it without the associated `.socket` +# unit; which is an error with how our vassal configurations are +# written. To fix this, `uwsgi@.service.d/socket.conf` overrides the +# unit a bit to disable non-socket-activated use. +add-file etc/systemd/system/uwsgi@.service.d/socket.conf <