See janvda/my-drive:inotify service
This service monitors a certain directory (including all its subdirectories) and writes all MODIFY and CLOSE_WRITE events happening to files in these directories to the FIFO special file (named pipe) /var/inotify/out (errors are reported to /var/inotify/error)
By default it is monitory directory /share but this can be changed through environment variable DIRECTORY.
If another service (e.g. a Node-RED application) is interested in these inotify events it just has to read these events from this FIFO special file (of course for this it is necessary that this service has access to this FIFO special file which can easily be realized via a docker volume - see inotify-data volume in docker-compose example below)
version: "3.9"
volumes:
share:
inotify-data:
services:
inotify:
image: janvda/inotify:1.0.1
restart: always
volumes:
- share:/share
- inotify-data:/var/inotify
DIRECTORYContent type
Image
Digest
sha256:b72cae90e…
Size
2.7 MB
Last updated
about 4 years ago
docker pull janvda/inotify:1.0.1