28 lines
693 B
Nix
28 lines
693 B
Nix
{config, ...}: let
|
|
serviceName = "it-tools";
|
|
servicePort = config.m3ta.ports.get serviceName;
|
|
in {
|
|
virtualisation.oci-containers.containers.${serviceName} = {
|
|
image = "docker.io/sharevb/it-tools:latest";
|
|
ports = ["127.0.0.1:${toString servicePort}:8080"];
|
|
};
|
|
|
|
# Traefik configuration
|
|
services.traefik.dynamicConfigOptions.http = {
|
|
services.${serviceName}.loadBalancer.servers = [
|
|
{
|
|
url = "http://localhost:${toString servicePort}/";
|
|
}
|
|
];
|
|
|
|
routers.${serviceName} = {
|
|
rule = "Host(`tools.az-gruppe.com`)";
|
|
tls = {
|
|
certResolver = "ionos";
|
|
};
|
|
service = serviceName;
|
|
entrypoints = "websecure";
|
|
};
|
|
};
|
|
}
|