fix: add systemd path and service for automatic Caddy reload on route changes

This commit is contained in:
Jakub Dorfman 2026-04-28 20:42:12 +02:00
parent e9045690d5
commit d71e12b3dd
2 changed files with 34 additions and 21 deletions

View file

@ -31,4 +31,17 @@
reverse_proxy 127.0.0.1:9911
'';
};
systemd.path."caddy-routes-reload" = {
wantedBy = [ "multi-user.target" ];
pathConfig = {
PathChanged = "/var/lib/containers/routes/routes.caddy";
};
};
systemd.service."caddy-routes-reload" = {
script = ''
systemctl reload caddy
'';
};
}