coppit / docker-inotify-command

Watch a folder for changes, and run a command in response
GNU Lesser General Public License v2.1
35 stars 32 forks source link

Feature request #4

Closed rosch100 closed 6 years ago

rosch100 commented 6 years ago

Thanks for the implementation!

I have a suggestion to make your container useful also for non-linux file systems (e.g. mounted smb shares).

The python watchdog also supports PollingObserver, which can detect changes in other file systems. If changing "Observer" to "PollingObserver", then your solution also works for these file systems.

It would be great to make it configurable e.g. via environment.

coppit commented 6 years ago

Implemented. Thanks for the feature suggestion!

There's a timeout option that defaults to 1 second. It seems to run quickly without timing out, but I might need to increase that number, or make it configurable.

Making this feature configurable in the environment doesn't really work, since each directory being monitoring might need a different policy. (When people use multiple config files.)