Script notification howto #863
-
I am not able to make the script notification work with Diun running in docker itself. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Can you show your compose file and diun configuration please? |
Beta Was this translation helpful? Give feedback.
-
results in |
Beta Was this translation helpful? Give feedback.
-
@spacedogs-wtf version: "3.7"
services:
diun:
image: crazymax/diun:latest
container_name: diun
restart: always
volumes:
- /diun/data:/data
- /var/run/docker.sock:/var/run/docker.sock
environment:
- "TZ=Europe/Berlin"
- "LOG_LEVEL=info"
- "LOG_JSON=false"
- "DIUN_WATCH_SCHEDULE=0 */6 * * *"
- "DIUN_WATCH_FIRSTCHECKNOTIF=true"
- "DIUN_PROVIDERS_DOCKER=true"
- "DIUN_PROVIDERS_DOCKER_WATCHBYDEFAULT=true"
- "DIUN_NOTIF_SCRIPT_CMD=echo"
- "DIUN_NOTIF_SCRIPT_ARGS=hello" |
Beta Was this translation helpful? Give feedback.
-
ah thats the missing piece. now it works 👍 maybe as a help for others: @crazy-max one last question: according to the docs it seems that you do not forward the new version of the updated container image as an environment variable to the script. is it possible to add another variable containing the new version? or maybe two variables: current and new version? if so i will add a feature request |
Beta Was this translation helpful? Give feedback.
-
If you want to exec a shell script yes you have to use
What do you mean by "new version"? |
Beta Was this translation helpful? Give feedback.
@spacedogs-wtf
echo 'hello'
is not a valid command. If you want to pass args you have to use theDIUN_NOTIF_SCRIPT_ARGS
env as explained in the documentation: