Adds email notification for site deploy

This commit is contained in:
Abhinav Sarkar 2018-07-07 10:01:38 +00:00
parent 3106d7bdab
commit a2680855c1
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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"