Add panel-api service and update panelctl script for container management
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
parent
c8ea1761ed
commit
49534ed568
2 changed files with 33 additions and 0 deletions
|
|
@ -21,5 +21,13 @@
|
||||||
}
|
}
|
||||||
reverse_proxy 192.168.100.11:80
|
reverse_proxy 192.168.100.11:80
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
virtualHosts."panel.srazka.com".extraConfig = ''
|
||||||
|
forward_auth 127.0.0.1:9091 {
|
||||||
|
uri /api/authz/forward-auth
|
||||||
|
copy_headers Remote-User Remote-Groups Remote-Email Remote-Name
|
||||||
|
}
|
||||||
|
reverse_proxy 127.0.0.1:9911
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,9 @@
|
||||||
pkgs.vim
|
pkgs.vim
|
||||||
pkgs.git
|
pkgs.git
|
||||||
pkgs.agenix
|
pkgs.agenix
|
||||||
|
pkgs.python3
|
||||||
pkgs.podman-compose
|
pkgs.podman-compose
|
||||||
|
(pkgs.writeShellScriptBin "panelctl" (builtins.readFile ./panel/panelctl.sh))
|
||||||
];
|
];
|
||||||
|
|
||||||
virtualisation.podman = {
|
virtualisation.podman = {
|
||||||
|
|
@ -46,6 +48,29 @@
|
||||||
"f /home/reudy/containers/routes/_placeholder.caddy 0640 reudy panelroutes -"
|
"f /home/reudy/containers/routes/_placeholder.caddy 0640 reudy panelroutes -"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
systemd.services.panel-api = {
|
||||||
|
description = "Minimal panel API service";
|
||||||
|
after = [ "network.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
User = "reudy";
|
||||||
|
Group = "panelroutes";
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = 3;
|
||||||
|
WorkingDirectory = "/home/reudy";
|
||||||
|
ExecStart = "${pkgs.python3}/bin/python3 ${./panel/panel-api.py}";
|
||||||
|
};
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
PANEL_API_BIND = "127.0.0.1";
|
||||||
|
PANEL_API_PORT = "9911";
|
||||||
|
PANEL_BASE_DIR = "/home/reudy/containers";
|
||||||
|
PANELCTL_PATH = "/run/current-system/sw/bin/panelctl";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
security.sudo.wheelNeedsPassword = true;
|
security.sudo.wheelNeedsPassword = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue