aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/denise/oms.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/private/websites/denise/oms.nix')
-rw-r--r--modules/private/websites/denise/oms.nix14
1 files changed, 12 insertions, 2 deletions
diff --git a/modules/private/websites/denise/oms.nix b/modules/private/websites/denise/oms.nix
index 18773ae..2f18037 100644
--- a/modules/private/websites/denise/oms.nix
+++ b/modules/private/websites/denise/oms.nix
@@ -38,7 +38,7 @@ in {
38 python = pkgs.python3.withPackages (p: [ p.gunicorn p.flask p.matplotlib p.unidecode ]); 38 python = pkgs.python3.withPackages (p: [ p.gunicorn p.flask p.matplotlib p.unidecode ]);
39 in 39 in
40 "${python}/bin/gunicorn -w4 -p /run/denise_oms/gunicorn.pid --bind unix:${socket} app:app"; 40 "${python}/bin/gunicorn -w4 -p /run/denise_oms/gunicorn.pid --bind unix:${socket} app:app";
41 User = "buildbot"; 41 User = "wwwrun";
42 Restart = "always"; 42 Restart = "always";
43 RestartSec = "5s"; 43 RestartSec = "5s";
44 PIDFile = "/run/denise_oms/gunicorn.pid"; 44 PIDFile = "/run/denise_oms/gunicorn.pid";
@@ -48,6 +48,16 @@ in {
48 }; 48 };
49 }; 49 };
50 50
51 security.sudo.extraRules = [
52 {
53 commands = [
54 { options = [ "NOPASSWD" ]; command = "${pkgs.systemd}/bin/systemctl restart denise-oms-beta.service"; }
55 { options = [ "NOPASSWD" ]; command = "${pkgs.systemd}/bin/systemctl restart denise-oms.service"; }
56 ];
57 users = ["buildbot"];
58 runAs = "root";
59 }
60 ];
51 services.websites.env.integration.vhostConfs.denise_oms_beta = { 61 services.websites.env.integration.vhostConfs.denise_oms_beta = {
52 certName = "denise"; 62 certName = "denise";
53 addToCerts = true; 63 addToCerts = true;
@@ -77,7 +87,7 @@ in {
77 python = pkgs.python3.withPackages (p: [ p.gunicorn p.flask p.matplotlib p.unidecode ]); 87 python = pkgs.python3.withPackages (p: [ p.gunicorn p.flask p.matplotlib p.unidecode ]);
78 in 88 in
79 "${python}/bin/gunicorn -w4 -p /run/denise_oms_beta/gunicorn.pid --bind unix:${socket_beta} app:app"; 89 "${python}/bin/gunicorn -w4 -p /run/denise_oms_beta/gunicorn.pid --bind unix:${socket_beta} app:app";
80 User = "buildbot"; 90 User = "wwwrun";
81 Restart = "always"; 91 Restart = "always";
82 RestartSec = "5s"; 92 RestartSec = "5s";
83 PIDFile = "/run/denise_oms_beta/gunicorn.pid"; 93 PIDFile = "/run/denise_oms_beta/gunicorn.pid";