diff options
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 17 | ||||
-rw-r--r-- | nnrss.ini | 38 |
3 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..eff544b48270 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = nnrss-uwsgi + pkgdesc = uWSGI configuration for nnrss + pkgver = 2 + pkgrel = 1 + url = https://git.roshless.me/~roshless/nnrss + arch = any + license = GPL + depends = nnrss + depends = uwsgi + depends = uwsgi-plugin-python + source = nnrss.ini + md5sums = d95cddcc135bd0ea4edc2a0de6d75974 + +pkgname = nnrss-uwsgi + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..033da11cfadc --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,17 @@ +# Maintainer: Roshless <pkg@roshless.com> + +pkgname=nnrss-uwsgi +pkgver=2 +pkgrel=1 +pkgdesc='uWSGI configuration for nnrss' +url='https://git.roshless.me/~roshless/nnrss' +arch=('any') +license=('GPL') +depends=('nnrss' 'uwsgi' 'uwsgi-plugin-python') +source=("nnrss.ini") + +package() { + install -Dm644 nnrss.ini "$pkgdir/etc/uwsgi/nnrss.ini" +} + +md5sums=('d95cddcc135bd0ea4edc2a0de6d75974') diff --git a/nnrss.ini b/nnrss.ini new file mode 100644 index 000000000000..252724375d33 --- /dev/null +++ b/nnrss.ini @@ -0,0 +1,38 @@ +[uwsgi] + +# do not allow custom variables and crash on unknown option +strict = yes + +chdir = /var/lib/nnrss +plugins = python +module = nnrss + +# crash if cant find module +need-app = true +# needed for scheduler +enable-threads = true +# flask app var +callable = APP +# true unless emperor +master = true + +uid = nnrss +gid = http + +socket = /var/run/nnrss/uwsgi.sock +chmod-socket = 664 +# stolen from stack +hook-as-root = exec:mkdir -vp /var/run/nnrss/; chown -v nnrss:http /var/run/nnrss/ + + +# performance + +# eh official docs arent very helpfull +# ive put here nproc number of cores +processes = 4 +# respawn processes taking more than 30 seconds +harakiri = 30 +# limit each worker memory to 512MB +limit-as = 512 +# respawn processes after serving 500 requests +max-requests = 500 |