Watches the specified file & triggers an email with changes to specified address.
1.6K
This simple node-watcher will watch for the change in the file specified via FILE_LOCATION and triggers an email with the data that's been changed.
| Environment Varialbe | Description |
|---|---|
| SMTP_HOST | smtp host address |
| SMTP_PORT | smtp host port number |
| TO_ADDRESS | Receiver's address |
| FROM_ADDRESS | From address |
| FILE_LOCATION | location of the file to watch for. |
To use this image as a docker, follow the below steps.
docker run --name file-watcher -e SMTP_HOST=<domain.com> -e SMTP_PORT=<25> -e TO_ADDRESS=<[email protected]> -e FROM_ADDRESS=<[email protected]> -e FILE_LOCATION=<LOCATION_OF_FILE> -d gkarthics/file-watcher
To use this image in kubernetes, below is a sample pod configuration file. This image can be used in parallel with someother images to watch the file changes made.
apiVersion: v1
kind: Pod
metadata:
labels:
app: file-watcher
name: file-watcher
spec:
containers:
- image: gkarthics/file-watcher
name: file-watcher
env:
- name: SMTP_HOST
value: <smtp.domain.com>
- name: SMTP_PORT
value: 25
- name: TO_ADDRESS
value: <[email protected]>
- name: FROM_ADDRESS
value: <[email protected]>
- name: FILE_LOCATION
value: </data/data.txt>
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
emptyDir: {}
Content type
Image
Digest
Size
14 MB
Last updated
over 5 years ago
docker pull gkarthics/file-watcher