Override entrypoint to run mailer
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Luke Murphy 2020-04-10 12:00:12 +02:00
parent 02433ec962
commit 1eaabc9c11
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
2 changed files with 36 additions and 0 deletions

View File

@ -7,3 +7,7 @@ RUN /venv/bin/pip install git+https://github.com/alerta/alerta-contrib.git#subdi
RUN /venv/bin/pip install dnspython==1.16.0
COPY . ${WORKDIR}
COPY sbin/* /sbin/
ENTRYPOINT ["/sbin/entrypoint.sh"]

32
sbin/entrypoint.sh Executable file
View File

@ -0,0 +1,32 @@
#!/bin/bash
set -eu -o pipefail
run_alerta_mailer() {
set -eu
alerta-mailer &
echo "-----> alerta-mailer is running..."
}
run_ps_background_check() {
set -eu
ps -aux | grep -i mailer
echo "-----> ps grep output ^^^"
}
# Main entrypoint
main() {
set -eu
run_alerta_mailer
run_ps_background_check
}
main
usr/local/bin/docker-entrypoint.sh "$@"