- 19 user-facing Router in 16 Modulen um middlewares = ["error-pages"] ergaenzt (502-504 -> Wartungsseite, analog CLD-1-Bestand): azess, azion-scheduler, bpi, n8n, pgadmin, phishboard, netbox (app + static), prtg/AZHA/AZDESK, grafana, technitium-dns, semaphore, kestra, online3dviewer, atrocore, stirling-pdf, excalidraw - Dokumentierte Ausnahmen (Kommentar am Router, Policy aus Brief): r.l-Dashboard (api-Router, Kontrollflaeche) und loki-push (Prometheus/Alloy brauchen echte Statuscodes) — bestehende Middleware-Listen unangetastet - Traefik errors-Middleware haelt den Original-Status 502-504 bei (keine statusRewrites) -> Blackbox-http_2xx-Probes auf g/wf/k/sem melden weiterhin Ausfaelle, keine zusaetzliche Metrik-Ausnahme noetig - Verifikation: nix eval aller 3 Hosts sauber; Router-Inspektion per jq bestaetigt 19x error-pages, api=auth, loki-push=loki-basic-auth
40 lines
1.2 KiB
Nix
40 lines
1.2 KiB
Nix
{config, ...}: let
|
|
serviceName = "excalidraw";
|
|
servicePort = config.m3ta.ports.get serviceName;
|
|
in {
|
|
virtualisation.oci-containers.containers."${serviceName}" = {
|
|
image = "docker.io/excalidraw/excalidraw:latest";
|
|
cmd = [
|
|
"/bin/sh"
|
|
"-c"
|
|
''
|
|
set -e
|
|
if ! grep -q "az-hide-excalidraw-plus" /usr/share/nginx/html/index.html; then
|
|
sed -i 's#</head>#<style id="az-hide-excalidraw-plus">.plus-banner{display:none!important}</style></head>#' /usr/share/nginx/html/index.html
|
|
fi
|
|
exec nginx -g 'daemon off;'
|
|
''
|
|
];
|
|
ports = ["127.0.0.1:${toString servicePort}:80"];
|
|
extraOptions = ["--ip=10.89.0.14" "--network=web"];
|
|
};
|
|
|
|
services.traefik.dynamicConfigOptions.http = {
|
|
services.${serviceName}.loadBalancer.servers = [{url = "http://localhost:${toString servicePort}/";}];
|
|
|
|
routers.${serviceName} = {
|
|
rule = "Host(`draw.l.az-gruppe.com`)";
|
|
tls = {certResolver = "ionos";};
|
|
service = serviceName;
|
|
entrypoints = "websecure";
|
|
middlewares = ["error-pages"];
|
|
};
|
|
};
|
|
|
|
# Wartungsmodus: Selbstanmeldung des Dienstes (Q3).
|
|
m3ta.maintenance.services.draw = {
|
|
domains = ["draw.l.az-gruppe.com"];
|
|
desc = "Excalidraw (Whiteboard)";
|
|
};
|
|
}
|