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 = {
|
||||
prometheus = {
|
||||
proxy = {
|
||||
enable = true;
|
||||
domain = "tegola.pro";
|
||||
host = "metrics.internal";
|
||||
};
|
||||
};
|
||||
|
||||
grafana = {
|
||||
proxy = {
|
||||
enable = true;
|
||||
domain = "tegola.pro";
|
||||
host = "metrics.internal";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ in
|
|||
|
||||
})
|
||||
|
||||
(lib.mkIf (cfg.proxy != { }) {
|
||||
(lib.mkIf cfg.proxy.enable {
|
||||
services.caddy = with cfg.proxy; {
|
||||
virtualHosts."grafana.${domain}".extraConfig = ''
|
||||
reverse_proxy http://${host}:3000
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue