41 lines
921 B
Nix
41 lines
921 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
serviceName = "zammad";
|
|
portUtils = import ../../../lib/port-utils.nix {inherit lib;};
|
|
servicePort = portUtils.getPort serviceName "AZ-CLD-1";
|
|
in {
|
|
services.${serviceName} = {
|
|
enable = true;
|
|
openPorts = false;
|
|
port = servicePort;
|
|
secretKeyBaseFile = config.age.secrets.zammad-secret.path;
|
|
database = {
|
|
createLocally = false;
|
|
port = 5432;
|
|
host = "127.0.0.1";
|
|
passwordFile = config.age.secrets.zammad-pw.path;
|
|
};
|
|
};
|
|
|
|
# Traefik configuration
|
|
services.traefik.dynamicConfigOptions.http = {
|
|
services.${serviceName}.loadBalancer.servers = [
|
|
{
|
|
url = "http://localhost:${toString servicePort}/";
|
|
}
|
|
];
|
|
|
|
routers.${serviceName} = {
|
|
rule = "Host(`help.az-gruppe.com`)";
|
|
tls = {
|
|
certResolver = "ionos";
|
|
};
|
|
service = serviceName;
|
|
entrypoints = "websecure";
|
|
};
|
|
};
|
|
}
|