refactor: abstract traefik router labels and dynamic config
This commit is contained in:
parent
d742671460
commit
95e67dd151
9 changed files with 152 additions and 74 deletions
|
|
@ -4,6 +4,7 @@ let
|
|||
cfg = config.homelab.apps.jellyfin;
|
||||
|
||||
networkName = "jellyfin";
|
||||
proxyNet = config.homelab.apps.traefik.sharedNetworkName;
|
||||
inherit (config.homelab.fileSystems) media;
|
||||
|
||||
UID = 3008;
|
||||
|
|
@ -49,6 +50,14 @@ in {
|
|||
];
|
||||
};
|
||||
|
||||
homelab.traefikRouters.feishin = {
|
||||
rule = "Host(`play.jelly.depeuter.dev`)";
|
||||
port = 9180;
|
||||
extraLabels = {
|
||||
"traefik.tls.options.default.minVersion" = "VersionTLS13";
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers = {
|
||||
jellyfin = {
|
||||
hostname = "jellyfin";
|
||||
|
|
@ -102,6 +111,7 @@ in {
|
|||
];
|
||||
extraOptions = [
|
||||
"--network=${networkName}"
|
||||
"--network=${proxyNet}"
|
||||
];
|
||||
environment = {
|
||||
# pre defined server name
|
||||
|
|
@ -114,12 +124,6 @@ in {
|
|||
SERVER_URL= "https://jelly.depeuter.dev";
|
||||
TZ = config.time.timeZone;
|
||||
};
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
"traefik.http.routers.feishin.rule" = "Host(`play.jelly.depeuter.dev`)";
|
||||
"traefik.http.services.feishin.loadbalancer.server.port" = feishinPort;
|
||||
"traefik.tls.options.default.minVersion" = "VersionTLS13";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue