send emails

This commit is contained in:
f 2021-03-27 10:47:17 -03:00
parent 99ea5a001f
commit 8809e18b77
2 changed files with 7 additions and 2 deletions

View file

@ -1,8 +1,13 @@
FROM alpine:3.13.1 AS build
ENV EMAIL monit@sutty.nl
RUN apk add --no-cache tzdata
FROM alpine:3.13.1
MAINTAINER "f <f@sutty.nl>"
COPY ./monitrc /etc/monitrc
RUN chmod 600 /etc/monitrc
RUN sed -re "s/@@EMAIL@@/${EMAIL}/" -i /etc/monitrc
# TODO: We don't want to receive lots of email, so we'll change this to
# a pingy instance that will also work as a status site.
@ -18,8 +23,7 @@ RUN install -dm 2750 -o root -g root /var/lib/monit
# Install config. monit.conf~ will be activated after allow_networks
# runs.
COPY ./monitrc /etc/monitrc
RUN chmod 600 /etc/monitrc
COPY --from=build /etc/monitrc /etc/monitrc
# Allow access to the web GUI
EXPOSE 2812

View file

@ -7,6 +7,7 @@ set statefile /var/lib/monit/state
set eventqueue basedir /var/lib/monit/events slots 100
set mailserver postfix
set limits { programoutput: 1 MB }
set alert @@EMAIL@@
set httpd port 2812
allow localhost