forked from DGNum/infrastructure
feat(nginx): Switch to simpleProxies for the majority of configs
This commit is contained in:
parent
af61ae6e61
commit
2f06f22ac7
22 changed files with 180 additions and 263 deletions
|
@ -9,6 +9,7 @@
|
|||
let
|
||||
inherit (lib) mapAttrsToList optionals;
|
||||
|
||||
host = "vote.dgnum.eu";
|
||||
port = 9888;
|
||||
|
||||
python3 =
|
||||
|
@ -168,25 +169,18 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
postgresql = {
|
||||
ensureDatabases = [ "kadenios" ];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "kadenios";
|
||||
ensureDBOwnership = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
dgn-web.simpleProxies.kadenios = {
|
||||
inherit host port;
|
||||
vhostConfig.locations."/static/".root = staticDrv;
|
||||
};
|
||||
|
||||
nginx.virtualHosts."vote.dgnum.eu" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
||||
locations = {
|
||||
"/".proxyPass = "http://127.0.0.1:${builtins.toString port}";
|
||||
"/static/".root = staticDrv;
|
||||
};
|
||||
};
|
||||
services.postgresql = {
|
||||
ensureDatabases = [ "kadenios" ];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "kadenios";
|
||||
ensureDBOwnership = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue