From 1eae4208e86a2d956479fa3371676003f38a6290 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 19 Apr 2023 14:34:19 -0300 Subject: [PATCH 1/4] feat: provide external configuration --- Dockerfile | 1 + monitrc | 1 + 2 files changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 138b508..7ac71d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,6 +28,7 @@ COPY --from=build /usr/share/zoneinfo/UTC /etc/localtime # Create directories RUN install -dm 2750 -o root -g root /etc/monit.d +RUN install -dm 2750 -o root -g root /etc/monit.d/external/ RUN install -dm 2750 -o root -g root /var/lib/monit # Install config diff --git a/monitrc b/monitrc index 40585f6..a1a1748 100644 --- a/monitrc +++ b/monitrc @@ -18,3 +18,4 @@ check program zeroconf if status = 0 then unmonitor include /etc/monit.d/*.conf +include /etc/monit.d/external/*.conf From 8cdc7138fe75a8f06c5e992e439a5a58ac262f65 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 19 Apr 2023 14:35:47 -0300 Subject: [PATCH 2/4] feat: configurable smtp --- zeroconf.conf | 2 +- zeroconf.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/zeroconf.conf b/zeroconf.conf index 6ecefda..5c9884c 100644 --- a/zeroconf.conf +++ b/zeroconf.conf @@ -1,5 +1,5 @@ set mmonit http://@@MMONIT@@/collector -set mailserver postfix port 25 using hostname @@HOSTNAME@@ +set mailserver @@POSTFIX@@ port 25 using hostname @@HOSTNAME@@ set alert @@EMAIL@@ diff --git a/zeroconf.sh b/zeroconf.sh index 79b64f3..6b40400 100755 --- a/zeroconf.sh +++ b/zeroconf.sh @@ -13,6 +13,7 @@ sed -re "s/@@EMAIL@@/${EMAIL}/" \ -e "s/@@HOSTNAME@@/${EMAIL_FROM#*@}/" \ -e "s/@@MMONIT@@/${MMONIT}/" \ -e "s/@@CREDENTIALS@@/${CREDENTIALS}/" \ + -e "s/@@POSTFIX@@/${POSTFIX:-postfix}/" \ /etc/zeroconf.conf > /etc/monit.d/zeroconf.conf monit -t From 3af76ddeec8e1f8c892804e3a6d9c59837f96207 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 19 Apr 2023 14:36:16 -0300 Subject: [PATCH 3/4] fix: use new ipv4 subnet --- zeroconf.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zeroconf.conf b/zeroconf.conf index 5c9884c..72d1e6d 100644 --- a/zeroconf.conf +++ b/zeroconf.conf @@ -11,6 +11,6 @@ set mail-format { set httpd port 2812 allow localhost - allow 172.0.0.0/8 + allow 10.13.12.0/24 allow "fd00:acab::/32" allow @@CREDENTIALS@@ From fedf64f2b94a958490745a45a1dcbbf6926b182c Mon Sep 17 00:00:00 2001 From: f Date: Wed, 10 May 2023 12:41:25 -0300 Subject: [PATCH 4/4] feat: alpine 3.18 --- .woodpecker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.woodpecker.yml b/.woodpecker.yml index 7f8be73..4d75d83 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -18,6 +18,7 @@ pipeline: event: "push" matrix: ALPINE_VERSION: + - "3.18.0" - "3.17.3" - "3.16.5" - "3.15.8"