Compare commits
No commits in common. "antifascista" and "syslogize" have entirely different histories.
antifascis
...
syslogize
7 changed files with 36 additions and 32 deletions
|
@ -1,25 +1,25 @@
|
|||
steps:
|
||||
pipeline:
|
||||
publish:
|
||||
image: "docker.io/woodpeckerci/plugin-docker-buildx"
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: "https://gitea.nulo.in"
|
||||
username: "sutty"
|
||||
repo: "gitea.nulo.in/sutty/monit"
|
||||
registry: registry.nulo.in
|
||||
username: sutty
|
||||
repo: registry.nulo.in/sutty/monit
|
||||
tags:
|
||||
- "${ALPINE_VERSION}"
|
||||
- "latest"
|
||||
- ${ALPINE_VERSION}
|
||||
- latest
|
||||
build_args:
|
||||
- "ALPINE_VERSION=${ALPINE_VERSION}"
|
||||
- "BASE_IMAGE=gitea.nulo.in/sutty/sutty"
|
||||
- ALPINE_VERSION=${ALPINE_VERSION}
|
||||
- BASE_IMAGE=alpine
|
||||
purge: false
|
||||
password:
|
||||
from_secret: "DOCKER_PASSWORD"
|
||||
secrets:
|
||||
- docker_password
|
||||
when:
|
||||
branch: "antifascista"
|
||||
event: "push"
|
||||
branch: antifascista
|
||||
event: push
|
||||
matrix:
|
||||
include:
|
||||
- ALPINE_VERSION: "3.21.0"
|
||||
- ALPINE_VERSION: "3.20.3"
|
||||
- ALPINE_VERSION: "3.19.4"
|
||||
- ALPINE_VERSION: "3.18.9"
|
||||
ALPINE_VERSION:
|
||||
- 3.16.1
|
||||
- 3.15.5
|
||||
- 3.14.7
|
||||
- 3.13.11
|
||||
|
|
21
Dockerfile
21
Dockerfile
|
@ -1,30 +1,39 @@
|
|||
ARG ALPINE_VERSION=3.18.3
|
||||
ARG BASE_IMAGE=gitea.nulo.in/sutty/sutty
|
||||
FROM ${BASE_IMAGE}:${ALPINE_VERSION} AS build
|
||||
ARG ALPINE_VERSION=3.13.6
|
||||
ARG BASE_IMAGE=alpine
|
||||
FROM ${BASE_IMAGE}:${ALPINE_VERSION} as build
|
||||
|
||||
RUN apk add --no-cache tzdata
|
||||
|
||||
COPY ./monitrc /etc/monitrc
|
||||
RUN chmod 600 /etc/monitrc
|
||||
|
||||
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
|
||||
LABEL org.opencontainers.image.authors="f@sutty.nl"
|
||||
ARG ALPINE_VERSION
|
||||
MAINTAINER "f <f@sutty.nl>"
|
||||
ENV EMAIL=monit@sutty.nl
|
||||
ENV EMAIL_FROM=monit@sutty.nl
|
||||
ENV MMONIT=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
|
||||
RUN apk add --no-cache tini monit knsupdate
|
||||
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
|
||||
COPY --from=build /etc/monitrc /etc/monitrc
|
||||
COPY ./nsupdate.sh /usr/local/bin/nsupdate
|
||||
COPY ./whatsmyip6.sh /usr/local/bin/whatsmyip6
|
||||
COPY ./whatsmydefaulteth.sh /usr/local/bin/whatsmydefaulteth
|
||||
COPY ./syslogize.sh /usr/local/bin/syslogize
|
||||
COPY ./zeroconf.sh /usr/local/bin/zeroconf
|
||||
COPY ./zeroconf.conf /etc/zeroconf.conf
|
||||
|
|
1
monitrc
1
monitrc
|
@ -18,4 +18,3 @@ check program zeroconf
|
|||
if status = 0 then unmonitor
|
||||
|
||||
include /etc/monit.d/*.conf
|
||||
include /etc/monit.d/external/*.conf
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
ip -6 r | grep default | tr -s " " | cut -d " " -f 5
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
ip address show ${1:-$(whatsmydefaulteth)} | grep inet6 | grep global | tr -s " " | cut -d " " -f 3 | cut -d / -f 1
|
||||
ip address show ${1:-eth0} | grep inet6 | grep global | tr -s " " | cut -d " " -f 3 | cut -d / -f 1
|
||||
|
|
|
@ -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@@
|
||||
|
||||
|
@ -11,6 +11,6 @@ set mail-format {
|
|||
|
||||
set httpd port 2812
|
||||
allow localhost
|
||||
allow 10.13.12.0/24
|
||||
allow 172.0.0.0/8
|
||||
allow "fd00:acab::/32"
|
||||
allow @@CREDENTIALS@@
|
||||
|
|
|
@ -13,7 +13,6 @@ 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
|
||||
|
|
Loading…
Reference in a new issue