36 lines
935 B
Nix
36 lines
935 B
Nix
{
|
|
config,
|
|
lib,
|
|
inputs,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
portUtils = import ../../../lib/port-utils.nix {inherit lib;};
|
|
servicePort = portUtils.getPort "azion-scheduler" "AZ-PRM-1";
|
|
schedulerProxyPort = portUtils.getPort "azion-scheduler-proxy" "AZ-PRM-1";
|
|
in {
|
|
services.azion-scheduler = {
|
|
enable = true;
|
|
package = inputs.azion-scheduler.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
|
port = servicePort;
|
|
proxyPort = schedulerProxyPort;
|
|
environmentFile = config.age.secrets.azion-env.path;
|
|
};
|
|
|
|
# Traefik configuration
|
|
services.traefik.dynamicConfigOptions.http = {
|
|
services.azion-scheduler.loadBalancer.servers = [
|
|
{url = "http://localhost:${toString servicePort}/";}
|
|
];
|
|
|
|
routers.azion-scheduler = {
|
|
rule = "Host(`azion.l.az-gruppe.com`)";
|
|
tls = {
|
|
certResolver = "ionos";
|
|
};
|
|
service = "azion-scheduler";
|
|
entrypoints = "websecure";
|
|
};
|
|
};
|
|
}
|