feat: azion-scheduler
This commit is contained in:
35
hosts/AZ-PRM-1/services/azion-scheduler.nix
Normal file
35
hosts/AZ-PRM-1/services/azion-scheduler.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
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";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user