To make this work as expected, provide these three Environments correctly and then you are good to go!
- ENV1 - your email - Plain text
- ENV2 - your password - Base64 encoded
- ZOHO_NOTIFY_WEBHOOK - Webhook, where you want to send notifications - Plain Text
I have tried with Webhook URL of one of my room on Google Chat.
So for setting up you env, do this -
export ENV1=kratik12345@gmail.com
export ENV2="U3VwZXJTZWNyZXRQYXNzd29yZEZvclpvaG8K" #(this is base64 encoded password of your account, which was **SuperSecretPasswordForZoho** in this case )
export ZOHO_NOTIFY_WEBHOOK="https://chat.googleapis.com/v1/spaces/kdkljklrgrgkdjhrjkdrrjkhhnrd;so;hsehrhuihegguihuirhuh"
Now, When you want to run and check the logs live -
sudo docker run -e ENV1=$ENV1 -e ENV2=$ENV2 -e ZOHO_NOTIFY_WEBHOOK=$ZOHO_NOTIFY_WEBHOOK --name zoho-container -it k4kratik/zoho
or If you want it to run in background -
sudo docker run -e ENV1=$ENV1 -e ENV2=$ENV2 -e ZOHO_NOTIFY_WEBHOOK=$ZOHO_NOTIFY_WEBHOOK --name zoho-container -itd k4kratik/zoho
And check logs by running:
sudo docker logs -f zoho-container