Is there any (complete) documentation or example for how to use services.uwsgi?
Or is uwsgi simply broken?
I’ve tried to set up lighttpd + uwsgi + radicale, but nothing worked. And even trying to run uwsgi manually via uwsgi --wsgi-file ... as described in the uwsgi-quickstart-documentation failed, because uwsgi does not know the --wsgi-file parameter…
It uses uwsgi ( with php-plugin but it’s similar for python) + nginx. I don’t have any example with lighthttpd though.
With python, you have to build an environment that contains your package with all its dependencies and then specifiy the wsgi object to uwsgi in its module option, like specified here: https://radicale.org/wsgi/
Currently, I’ve moved away from uwsgi, because (a) although it’s described as “developer/sysadmin-friendly”, it’s not and (b) the uwsgi-package in NixOS seems useless when not used via services.uwsgi, because it does not include any plugins and so nothing works, even --wsgi-file fails.
(I’m now using a systemd-user-service and flup as scgi-wsgi-wrapper, which is easy to set up and works well.)
The Nixpkgs-package-description of uwsgi says “A fast, self-healing and developer/sysadmin-friendly application container server coded in pure C”. And that’s simply not true. I can explain why I don’t use it:
The package itself (without services.uwsgi) does not really work: Everything from the uwsgi-quickstart-documentation fails, and there’s no documentation for making it work. It looks like uwsgi even needs a wsgi-plugin, which is missing (wtf?).
The uwsgi-documentation says: “When you start learning uWSGI, try to build from official sources: using distribution-supplied packages may bring you plenty of headaches.” So, I shouldn’t use the distribution-packages, but do everything myself. Great.
services.uwsgi is not well documented. You probably need some previous experience with uwsgi and have to guess how to use it.
No matter what I tried, I did not get radicale (or any other custom service) to run with uwsgi. I would probably have to completely ignore the NixOS-uwsgi-package/service, download the uwsgi-source and setup a user-service using this uwsgi-instance. Before I do this, I rather use a simple scgi-wsgi-wrapper instead, which is much easier to use than all this uwsgi-hassle.
@b42 I’m porting my existing ansible deployments to Nix. They use and configure uwsgi already so I don’t have to learn / build these pieces when writing apps modules. On the other hand I’ve never done any deployment on gunicorn so it is hard for me to compare