1
0

Add status page to monitoring-3

This commit is contained in:
2021-05-15 18:43:15 +02:00
parent 1caff12782
commit 6ee3387680
3 changed files with 59 additions and 0 deletions

View File

@@ -120,6 +120,27 @@ in {
};
};
users.users.uptimestatus = {
description = "Uptime Status Service";
group = "uptimestatus";
home = "/var/lib/uptimestatus/";
useDefaultShell = true;
isSystemUser = true;
};
users.groups.uptimestatus = {};
systemd.services.uptimestatus = {
wantedBy = [ "multi-user.target" ];
serviceConfig = {
RuntimeDirectory = "uptimestatus";
StateDirectory = "uptimestatus";
User = "uptimestatus";
Group = "uptimestatus";
};
script = "gunicorn -w 4 -b [::1]:8235 uptimestatus:app";
path = with pkgs; [ (python38.withPackages (ps: [ ps.gunicorn uptimestatus ])) ];
};
services.nginx = {
enable = true;
@@ -134,6 +155,11 @@ in {
forceSSL = true;
locations."/".proxyPass = "http://[::1]:3001/";
};
"status.monitoring.clerie.de" = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://[::1]:8235/";
};
};
};