nixos/syncserver: use gunicorn

As described in `syncserver`'s documentation.
Makes it possible to run behind a reverse proxy.
This commit is contained in:
Nadrieril 2019-01-28 17:56:20 +01:00
parent 957d0589ad
commit 63c7fe0819

View file

@ -13,7 +13,7 @@ let
overrides = ${cfg.privateConfig}
[server:main]
use = egg:Paste#http
use = egg:gunicorn
host = ${cfg.listen.address}
port = ${toString cfg.listen.port}
@ -135,7 +135,7 @@ in
wantedBy = [ "multi-user.target" ];
path = [
pkgs.coreutils
(pkgs.python.withPackages (ps: [ pkgs.syncserver ps.pasteScript ps.requests ]))
(pkgs.python.withPackages (ps: [ pkgs.syncserver ps.gunicorn ]))
];
serviceConfig = {
@ -168,8 +168,9 @@ in
chown ${user}:${group} ${defaultDbLocation}
fi
'';
script = ''
paster serve ${syncServerIni}
gunicorn --paste ${syncServerIni}
'';
};