From a2680855c18f4b5a480b44916484baf935d56851 Mon Sep 17 00:00:00 2001 From: Abhinav Sarkar Date: Sat, 7 Jul 2018 10:01:38 +0000 Subject: [PATCH] Adds email notification for site deploy --- webhooks/Dockerfile | 2 +- webhooks/redeploy-site.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/webhooks/Dockerfile b/webhooks/Dockerfile index 63ce6bd..28b0e0c 100644 --- a/webhooks/Dockerfile +++ b/webhooks/Dockerfile @@ -1,5 +1,5 @@ FROM almir/webhook -RUN apk add --update docker py-pip \ +RUN apk add --update docker py-pip heirloom-mailx \ && pip install docker-compose \ && rm -rf /var/cache/apk/* COPY hooks.json /etc/webhook/hooks.json diff --git a/webhooks/redeploy-site.sh b/webhooks/redeploy-site.sh index 1640654..194ec03 100755 --- a/webhooks/redeploy-site.sh +++ b/webhooks/redeploy-site.sh @@ -1,4 +1,5 @@ #!/bin/sh docker-compose pull site -docker-compose up -d --build site +docker-compose up -d --build site +echo "Site deployed" | mailx -v -r "hooks@abhinavsarkar.net" -s "Site deployed" -S smtp="smtp:25" "abhinav.sarkar@gmail.com"