Override entrypoint to run mailer
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
02433ec962
commit
1eaabc9c11
@ -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
32
sbin/entrypoint.sh
Executable 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 "$@"
|
Reference in New Issue
Block a user