fix: Use proxy enable option for Prometheus and Grafana
This commit is contained in:
parent
4891f0964a
commit
61f207ae81
2 changed files with 4 additions and 1 deletions
|
|
@ -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";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue