first commit
This commit is contained in:
36
hosts/AZ-PRM-1/services/azion-scheduler.nix
Normal file
36
hosts/AZ-PRM-1/services/azion-scheduler.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
serviceName = "azion-scheduler";
|
||||
proxyServiceName = "${serviceName}-proxy";
|
||||
servicePort = config.m3ta.ports.get serviceName;
|
||||
schedulerProxyPort = config.m3ta.ports.get proxyServiceName;
|
||||
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.${serviceName}.loadBalancer.servers = [
|
||||
{url = "http://localhost:${toString servicePort}/";}
|
||||
];
|
||||
|
||||
routers.${serviceName} = {
|
||||
rule = "Host(`azion.l.az-gruppe.com`)";
|
||||
tls = {
|
||||
certResolver = "ionos";
|
||||
};
|
||||
service = serviceName;
|
||||
entrypoints = "websecure";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user