Add traefik route for grafana dashboard
This commit is contained in:
parent
a1c28e779a
commit
b575f6af22
|
@ -1,6 +1,7 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ../traefik/grafana.nix ];
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
17
services/traefik/grafana.nix
Normal file
17
services/traefik/grafana.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./default.nix ];
|
||||
services.traefik.dynamicConfigOptions = {
|
||||
http = {
|
||||
routers.grafana = {
|
||||
rule = "Host(`grafana.xenia.me.uk`)";
|
||||
entryPoints = [ "http" "https" ];
|
||||
service = "grafana-webinterface";
|
||||
tls = { certResolver = "default"; };
|
||||
};
|
||||
services.grafana-webinterface.loadBalancer.servers =
|
||||
[{ url = "http://localhost:3100"; }];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue