fix: Use proxy enable option for Prometheus and Grafana

This commit is contained in:
pazpi 2024-11-29 16:13:24 +01:00
parent 4891f0964a
commit 61f207ae81
2 changed files with 4 additions and 1 deletions

View file

@ -39,12 +39,15 @@ in
monitoring = { monitoring = {
prometheus = { prometheus = {
proxy = { proxy = {
enable = true;
domain = "tegola.pro"; domain = "tegola.pro";
host = "metrics.internal"; host = "metrics.internal";
}; };
}; };
grafana = { grafana = {
proxy = { proxy = {
enable = true;
domain = "tegola.pro"; domain = "tegola.pro";
host = "metrics.internal"; host = "metrics.internal";
}; };

View file

@ -109,7 +109,7 @@ in
}) })
(lib.mkIf (cfg.proxy != { }) { (lib.mkIf cfg.proxy.enable {
services.caddy = with cfg.proxy; { services.caddy = with cfg.proxy; {
virtualHosts."grafana.${domain}".extraConfig = '' virtualHosts."grafana.${domain}".extraConfig = ''
reverse_proxy http://${host}:3000 reverse_proxy http://${host}:3000