You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We see a lot of crudges and hacks to notify nginx or the nginx container
informing it it needs to restart. While there certainly cases that
require manual control, for the most, this could be easily automated.
With inotify, we can recursively monitor /etc/nginx (or any directory
per config) for changes (currently, not monitoring for for access time
changes, e.g. reads or `touch` events). On an event, we sleep first for
(configurable) seconds, the default is 10, so that multiple updates
don't cause multiple restarts. E.g. copying 10 certificates into
/etc/nginx/certs, won't trigger 10 reloads.
The monitor will run indefinably, and can't be easily killed. This isn't
a problem however, as this is specifically a docker entry point and it
is fair to assume this will only ever be run under docker.
The current configuration won't change existing behavior, it needs to be
explicitly enabled.
Signed-off-by: Olliver Schinagl <[email protected]>
0 commit comments