services: prometheus: switch over to dedicated subdomain instead of subpath
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
0daabd8768
commit
893ceb1687
Binary file not shown.
|
@ -1,10 +1,11 @@
|
|||
{ my, secrets, ... }:
|
||||
{ config, my, secrets, ... }:
|
||||
|
||||
{
|
||||
let fqdn = "prometheus.${my.domain}";
|
||||
in {
|
||||
services.prometheus = {
|
||||
enable = true;
|
||||
checkConfig = "syntax-only";
|
||||
webExternalUrl = "http://${my.homelab.fqdn}/prometheus";
|
||||
webExternalUrl = "https://${fqdn}";
|
||||
listenAddress = "[::1]";
|
||||
scrapeConfigs = [
|
||||
{
|
||||
|
@ -65,4 +66,15 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts.${fqdn} = let cfg = config.services.prometheus;
|
||||
in {
|
||||
forceSSL = true;
|
||||
useACMEHost = my.domain;
|
||||
kTLS = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://${cfg.listenAddress}:${toString cfg.port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue