fix: add systemd path and service for automatic Caddy reload on route changes
This commit is contained in:
parent
e9045690d5
commit
d71e12b3dd
2 changed files with 34 additions and 21 deletions
13
caddy.nix
13
caddy.nix
|
|
@ -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
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue