- Freundliche Wartungsseite (AZ-Branding, eingebettetes Logo, Auto-Reload, Dienst-Erkennung per Hostname) unter services/maintenance/www/ - nginx auf 127.0.0.1:3090 liefert die Seite mit 503 + Retry-After + no-store fuer alle Pfade - Traefik: File-Provider auf ueberwachtes Verzeichnis /var/lib/traefik/dynamic umgestellt (staticConfigFile-Override); Basis-Konfig wird per preStart als 00-base.toml hineingelinkt - maintenance-CLI (on/off/status/list): schaltet pro Dienst Router mit Prioritaet 1000 auf den Wartungs-Service, wirksam in ~1-2 s ohne Rebuild - Auto-Aus per transientem systemd-Timer (Default 4 h) + stuendlicher Expiry-Sweep als Reboot-Nachversicherung - ntfy-Push bei on/off (opt-in via Token-Datei) - errors-Middleware error-pages (502-504) an allen HTTP-Routern: Auch bei ungeplanten Ausfaellen erscheint die Wartungsseite statt Traefik-Standardfehler
46 lines
1.1 KiB
Nix
46 lines
1.1 KiB
Nix
{config, ...}: let
|
|
serviceName = "n8n";
|
|
servicePort = config.m3ta.ports.get serviceName;
|
|
in {
|
|
services.${serviceName} = {
|
|
enable = true;
|
|
environment = {
|
|
WEBHOOK_URL = "https://wf.az-gruppe.com";
|
|
N8N_RUNNERS_ENABLED = true;
|
|
N8N_NATIVE_PYTHON_RUNNER = true;
|
|
N8N_RUNNERS_AUTH_TOKEN_FILE = config.age.secrets.n8n-runner-auth-token.path;
|
|
NODE_FUNCTION_ALLOW_EXTERNAL = "*";
|
|
N8N_RUNNERS_STDLIB_ALLOW = "*";
|
|
};
|
|
taskRunners = {
|
|
enable = true;
|
|
environment = {
|
|
N8N_RUNNERS_STDLIB_ALLOW = "*";
|
|
};
|
|
};
|
|
};
|
|
|
|
systemd.services.${serviceName}.serviceConfig = {
|
|
EnvironmentFile = config.age.secrets.n8n-env.path;
|
|
};
|
|
|
|
# Traefik configuration
|
|
services.traefik.dynamicConfigOptions.http = {
|
|
services.${serviceName}.loadBalancer.servers = [
|
|
{
|
|
url = "http://localhost:${toString servicePort}/";
|
|
}
|
|
];
|
|
|
|
routers.${serviceName} = {
|
|
rule = "Host(`wf.az-gruppe.com`)";
|
|
tls = {
|
|
certResolver = "ionos";
|
|
};
|
|
service = serviceName;
|
|
entrypoints = "websecure";
|
|
middlewares = ["error-pages"];
|
|
};
|
|
};
|
|
}
|