Fix traefik routes functions
parent
35bfc55356
commit
a900c1931f
|
@ -6,15 +6,18 @@
|
||||||
|
|
||||||
traefikRoutes =
|
traefikRoutes =
|
||||||
{
|
{
|
||||||
hostname,
|
host,
|
||||||
config,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
hostname = host.hostname;
|
||||||
|
config = host.config.sonarr;
|
||||||
|
in
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
name = "${hostname}-sonarr";
|
name = "${hostname}-sonarr";
|
||||||
rule = "Host(`${config.sonarr.domain}`)";
|
rule = "Host(`${config.domain}`)";
|
||||||
target = "http://${config.ip}:8989";
|
target = "http://${host.ip}:8989";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,7 @@
|
||||||
concatMap (
|
concatMap (
|
||||||
role:
|
role:
|
||||||
role.traefikRoutes {
|
role.traefikRoutes {
|
||||||
inherit hostname;
|
host = hosts.${hostname};
|
||||||
config = hosts.${hostname}.config;
|
|
||||||
}
|
}
|
||||||
) hosts.${hostname}.roles
|
) hosts.${hostname}.roles
|
||||||
) (builtins.attrNames hosts);
|
) (builtins.attrNames hosts);
|
||||||
|
|
Loading…
Reference in New Issue