Compare commits
68 commits
syslogize
...
antifascis
Author | SHA1 | Date | |
---|---|---|---|
![]() |
03fc81bfc6 | ||
![]() |
8a71b8fd34 | ||
![]() |
39ad053d64 | ||
![]() |
7c99447606 | ||
![]() |
0e8b6ac71a | ||
![]() |
acaf232d62 | ||
![]() |
fc1a12e592 | ||
![]() |
0dab2e2f21 | ||
![]() |
000ac53f39 | ||
![]() |
441dc86068 | ||
![]() |
6ce591abc0 | ||
![]() |
41354bbc95 | ||
![]() |
7f7cac3324 | ||
![]() |
c0e6b8150b | ||
![]() |
f7da597784 | ||
![]() |
07394ea227 | ||
![]() |
b99a8111d8 | ||
![]() |
aa086a76af | ||
![]() |
01303721ce | ||
![]() |
2a72840be0 | ||
![]() |
397dff920a | ||
![]() |
e66b364db7 | ||
![]() |
b8b98ef2e0 | ||
![]() |
ac0b189bb5 | ||
![]() |
b921379aa0 | ||
![]() |
c2d6e5bc81 | ||
![]() |
8dd7d4605a | ||
![]() |
d11e588f03 | ||
![]() |
fd9bdb2eef | ||
![]() |
04b0f20647 | ||
![]() |
7d84f1ad9a | ||
![]() |
5085c7e8df | ||
![]() |
1233c89aff | ||
![]() |
9b66b4cbc7 | ||
![]() |
19868b56cb | ||
![]() |
3dde92d4de | ||
![]() |
3e098e8c24 | ||
![]() |
bdf4d61db2 | ||
![]() |
582b83d3fa | ||
![]() |
84b848b911 | ||
![]() |
5d35cad642 | ||
![]() |
d8ef27a7d6 | ||
![]() |
fedf64f2b9 | ||
![]() |
3af76ddeec | ||
![]() |
8cdc7138fe | ||
![]() |
1eae4208e8 | ||
![]() |
a28eb9596d | ||
![]() |
24c31e7eb8 | ||
![]() |
da19bd76f8 | ||
![]() |
6f246db003 | ||
![]() |
c7eafaed22 | ||
![]() |
4246b0ba57 | ||
![]() |
baf76a7c9b | ||
![]() |
1068b67884 | ||
![]() |
434501ef54 | ||
![]() |
e735a775e9 | ||
![]() |
dcf07f90e7 | ||
![]() |
4aa380ee62 | ||
![]() |
764999f0ff | ||
![]() |
c4d0c8ac35 | ||
![]() |
b0dadddbb0 | ||
![]() |
c1e94bd27f | ||
![]() |
9329c68860 | ||
![]() |
0b354f4fea | ||
![]() |
f031a78685 | ||
![]() |
65b97b7dfd | ||
![]() |
9ad0295f11 | ||
e2894c0aae |
7 changed files with 32 additions and 36 deletions
|
@ -1,25 +1,25 @@
|
||||||
pipeline:
|
steps:
|
||||||
publish:
|
publish:
|
||||||
image: plugins/docker
|
image: "docker.io/woodpeckerci/plugin-docker-buildx"
|
||||||
settings:
|
settings:
|
||||||
registry: registry.nulo.in
|
registry: "https://gitea.nulo.in"
|
||||||
username: sutty
|
username: "sutty"
|
||||||
repo: registry.nulo.in/sutty/monit
|
repo: "gitea.nulo.in/sutty/monit"
|
||||||
tags:
|
tags:
|
||||||
- ${ALPINE_VERSION}
|
- "${ALPINE_VERSION}"
|
||||||
- latest
|
- "latest"
|
||||||
build_args:
|
build_args:
|
||||||
- ALPINE_VERSION=${ALPINE_VERSION}
|
- "ALPINE_VERSION=${ALPINE_VERSION}"
|
||||||
- BASE_IMAGE=alpine
|
- "BASE_IMAGE=gitea.nulo.in/sutty/sutty"
|
||||||
purge: false
|
purge: false
|
||||||
secrets:
|
password:
|
||||||
- docker_password
|
from_secret: "DOCKER_PASSWORD"
|
||||||
when:
|
when:
|
||||||
branch: antifascista
|
branch: "antifascista"
|
||||||
event: push
|
event: "push"
|
||||||
matrix:
|
matrix:
|
||||||
ALPINE_VERSION:
|
include:
|
||||||
- 3.16.1
|
- ALPINE_VERSION: "3.21.0"
|
||||||
- 3.15.5
|
- ALPINE_VERSION: "3.20.3"
|
||||||
- 3.14.7
|
- ALPINE_VERSION: "3.19.4"
|
||||||
- 3.13.11
|
- ALPINE_VERSION: "3.18.9"
|
||||||
|
|
21
Dockerfile
21
Dockerfile
|
@ -1,39 +1,30 @@
|
||||||
ARG ALPINE_VERSION=3.13.6
|
ARG ALPINE_VERSION=3.18.3
|
||||||
ARG BASE_IMAGE=alpine
|
ARG BASE_IMAGE=gitea.nulo.in/sutty/sutty
|
||||||
FROM ${BASE_IMAGE}:${ALPINE_VERSION} as build
|
FROM ${BASE_IMAGE}:${ALPINE_VERSION} AS build
|
||||||
|
|
||||||
RUN apk add --no-cache tzdata
|
|
||||||
|
|
||||||
COPY ./monitrc /etc/monitrc
|
COPY ./monitrc /etc/monitrc
|
||||||
RUN chmod 600 /etc/monitrc
|
RUN chmod 600 /etc/monitrc
|
||||||
|
|
||||||
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
|
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
|
||||||
ARG ALPINE_VERSION
|
LABEL org.opencontainers.image.authors="f@sutty.nl"
|
||||||
MAINTAINER "f <f@sutty.nl>"
|
|
||||||
ENV EMAIL=monit@sutty.nl
|
ENV EMAIL=monit@sutty.nl
|
||||||
ENV EMAIL_FROM=monit@sutty.nl
|
ENV EMAIL_FROM=monit@sutty.nl
|
||||||
ENV MMONIT=mmmonit.athshe.sutty.nl
|
ENV MMONIT=mmmonit.athshe.sutty.nl
|
||||||
ENV CREDENTIALS=mmmonit:mmmonit.athshe.sutty.nl
|
ENV CREDENTIALS=mmmonit:mmmonit.athshe.sutty.nl
|
||||||
|
|
||||||
# Locale
|
|
||||||
ENV LANG="C.UTF-8"
|
|
||||||
|
|
||||||
# Sutty's repository
|
|
||||||
RUN echo ${ALPINE_VERSION} | cut -d . -f 1,2 | xargs -I {} echo https://alpine.sutty.nl/alpine/v{}/sutty | tee -a /etc/apk/repositories
|
|
||||||
RUN wget https://alpine.sutty.nl/alpine/sutty.pub -O /etc/apk/keys/alpine@sutty.nl-5ea884cd.rsa.pub
|
|
||||||
|
|
||||||
# Install monit and remove default config
|
# Install monit and remove default config
|
||||||
RUN apk add --no-cache tini monit knsupdate
|
RUN apk add --no-cache tini monit knsupdate
|
||||||
COPY --from=build /usr/share/zoneinfo/UTC /etc/localtime
|
|
||||||
|
|
||||||
# Create directories
|
# Create directories
|
||||||
RUN install -dm 2750 -o root -g root /etc/monit.d
|
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
|
RUN install -dm 2750 -o root -g root /var/lib/monit
|
||||||
|
|
||||||
# Install config
|
# Install config
|
||||||
COPY --from=build /etc/monitrc /etc/monitrc
|
COPY --from=build /etc/monitrc /etc/monitrc
|
||||||
COPY ./nsupdate.sh /usr/local/bin/nsupdate
|
COPY ./nsupdate.sh /usr/local/bin/nsupdate
|
||||||
COPY ./whatsmyip6.sh /usr/local/bin/whatsmyip6
|
COPY ./whatsmyip6.sh /usr/local/bin/whatsmyip6
|
||||||
|
COPY ./whatsmydefaulteth.sh /usr/local/bin/whatsmydefaulteth
|
||||||
COPY ./syslogize.sh /usr/local/bin/syslogize
|
COPY ./syslogize.sh /usr/local/bin/syslogize
|
||||||
COPY ./zeroconf.sh /usr/local/bin/zeroconf
|
COPY ./zeroconf.sh /usr/local/bin/zeroconf
|
||||||
COPY ./zeroconf.conf /etc/zeroconf.conf
|
COPY ./zeroconf.conf /etc/zeroconf.conf
|
||||||
|
|
1
monitrc
1
monitrc
|
@ -18,3 +18,4 @@ check program zeroconf
|
||||||
if status = 0 then unmonitor
|
if status = 0 then unmonitor
|
||||||
|
|
||||||
include /etc/monit.d/*.conf
|
include /etc/monit.d/*.conf
|
||||||
|
include /etc/monit.d/external/*.conf
|
||||||
|
|
3
whatsmydefaulteth.sh
Executable file
3
whatsmydefaulteth.sh
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
ip -6 r | grep default | tr -s " " | cut -d " " -f 5
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
ip address show ${1:-eth0} | grep inet6 | grep global | tr -s " " | cut -d " " -f 3 | cut -d / -f 1
|
ip address show ${1:-$(whatsmydefaulteth)} | grep inet6 | grep global | tr -s " " | cut -d " " -f 3 | cut -d / -f 1
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
set mmonit http://@@MMONIT@@/collector
|
set mmonit http://@@MMONIT@@/collector
|
||||||
set mailserver postfix port 25 using hostname @@HOSTNAME@@
|
set mailserver @@POSTFIX@@ port 25 using hostname @@HOSTNAME@@
|
||||||
|
|
||||||
set alert @@EMAIL@@
|
set alert @@EMAIL@@
|
||||||
|
|
||||||
|
@ -11,6 +11,6 @@ set mail-format {
|
||||||
|
|
||||||
set httpd port 2812
|
set httpd port 2812
|
||||||
allow localhost
|
allow localhost
|
||||||
allow 172.0.0.0/8
|
allow 10.13.12.0/24
|
||||||
allow "fd00:acab::/32"
|
allow "fd00:acab::/32"
|
||||||
allow @@CREDENTIALS@@
|
allow @@CREDENTIALS@@
|
||||||
|
|
|
@ -13,6 +13,7 @@ sed -re "s/@@EMAIL@@/${EMAIL}/" \
|
||||||
-e "s/@@HOSTNAME@@/${EMAIL_FROM#*@}/" \
|
-e "s/@@HOSTNAME@@/${EMAIL_FROM#*@}/" \
|
||||||
-e "s/@@MMONIT@@/${MMONIT}/" \
|
-e "s/@@MMONIT@@/${MMONIT}/" \
|
||||||
-e "s/@@CREDENTIALS@@/${CREDENTIALS}/" \
|
-e "s/@@CREDENTIALS@@/${CREDENTIALS}/" \
|
||||||
|
-e "s/@@POSTFIX@@/${POSTFIX:-postfix}/" \
|
||||||
/etc/zeroconf.conf > /etc/monit.d/zeroconf.conf
|
/etc/zeroconf.conf > /etc/monit.d/zeroconf.conf
|
||||||
|
|
||||||
monit -t
|
monit -t
|
||||||
|
|
Loading…
Reference in a new issue