diff --git a/hosts/dingserver/caddy.nix b/hosts/dingserver/caddy.nix index 75f3989..974b3c8 100644 --- a/hosts/dingserver/caddy.nix +++ b/hosts/dingserver/caddy.nix @@ -8,6 +8,13 @@ services.caddy = { enable = true; virtualHosts = { + + "http://metrics.town" = { + extraConfig = '' + reverse_proxy http://localhost:3000 + ''; + }; + "matrix.broccoli.town" = { extraConfig = '' reverse_proxy /_matrix/* http://localhost:8008 diff --git a/hosts/dingserver/configuration.nix b/hosts/dingserver/configuration.nix index 92421bc..008fff9 100644 --- a/hosts/dingserver/configuration.nix +++ b/hosts/dingserver/configuration.nix @@ -11,6 +11,7 @@ ./caddy.nix ./synapse.nix ./syncthing.nix + ./prometheus.nix ]; # Force disable the common boot loader diff --git a/hosts/dingserver/synapse.nix b/hosts/dingserver/synapse.nix index 5354f02..578157e 100644 --- a/hosts/dingserver/synapse.nix +++ b/hosts/dingserver/synapse.nix @@ -13,6 +13,7 @@ in { services.matrix-synapse = { enable = true; settings = { + enable_metrics = true; server_name = "broccoli.town"; database = { name = "psycopg2"; @@ -35,6 +36,16 @@ in { } ]; } + { + port = 9000; + type = "metrics"; + tls = false; + bind_addresses = [ + "0.0.0.0" + ]; + resources = [ + ]; + } ]; }; };