Compare commits

..

23 commits

Author SHA1 Message Date
f
e003944711 Merge branch 'antifascista' of https://gitea.nulo.in/Sutty/containers-monit into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-04-02 11:24:59 -03:00
f
e41a77ee7b cache prevents build if the version doesn't exist 2022-03-29 10:15:29 -03:00
f
bbfa212002 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista 2022-03-28 19:07:55 -03:00
f
deaa49652f alpine releases
https://alpinelinux.org/posts/Alpine-3.12.11-3.13.9-3.14.5-3.15.3-released.html
2022-03-28 19:06:57 -03:00
f
b198d36200 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista 2022-03-19 14:50:27 -03:00
f
e565c1380a woodpecker-cli lint 2022-03-19 14:48:54 -03:00
f
45562a4354 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista 2022-03-19 14:48:23 -03:00
f
1b72fdc8b0 credentials for mmmonit 2022-03-19 14:47:05 -03:00
f
65304feb56 alpine upgrade 2022-03-19 14:46:16 -03:00
f
03513b78ec less data 2022-03-15 18:05:28 -03:00
f
8b674a10b9 we'll skip this version 2022-03-14 18:34:42 -03:00
f
d4294d219a register to mmmonit with credentials 2022-03-14 18:34:00 -03:00
f
a615fdf509 default env 2022-03-14 11:10:22 -03:00
f
c0531c8f3c bug introduced by b04c169a8e 2022-03-14 11:09:55 -03:00
f
4387534944 mmonit support 2022-03-13 23:27:39 -03:00
f
a299ab663f newer versions first 2022-03-08 09:43:09 -03:00
f
b04c169a8e autoconfigure email 2022-03-07 22:05:10 -03:00
f
7aa9fe6d10 fixes 2022-03-07 19:59:50 -03:00
f
d27b839b0d verify config 2022-03-07 19:55:25 -03:00
f
755c3c75d6 configurable email 2022-03-07 18:59:28 -03:00
f
9a9ee411da alpine versions 2022-03-03 22:59:09 -03:00
f
0c9ca5f55b don't cleanup after build
should allow woodpecker to reutilize the cache
2022-03-02 15:53:19 -03:00
f
ed9e013135 knot is always at knot.doma.in 2022-03-01 18:34:11 -03:00
5 changed files with 56 additions and 26 deletions

View file

@ -1,34 +1,32 @@
pipeline:
publish:
image: plugins/docker
registry: registry.nulo.in
repo: registry.nulo.in/sutty/ruby
tags:
- ${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH}
- latest
build_args:
- RUBY_VERSION=${RUBY_VERSION}
- RUBY_PATCH=${RUBY_PATCH}
- ALPINE_VERSION=${ALPINE_VERSION}
- BASE_IMAGE=registry.nulo.in/sutty/monit
username: sutty
settings:
registry: registry.nulo.in
username: sutty
repo: registry.nulo.in/sutty/ruby
tags:
- ${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH}
- latest
build_args:
- RUBY_VERSION=${RUBY_VERSION}
- RUBY_PATCH=${RUBY_PATCH}
- ALPINE_VERSION=${ALPINE_VERSION}
- BASE_IMAGE=registry.nulo.in/sutty/monit
purge: false
secrets:
- docker_password
cache_from: registry.nulo.in/sutty/ruby:${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH}
when:
branch: antifascista
event: push
matrix:
include:
- ALPINE_VERSION: 3.13.6
- ALPINE_VERSION: 3.13.9
RUBY_VERSION: 2.7
RUBY_PATCH: 5
- ALPINE_VERSION: 3.13.7
- ALPINE_VERSION: 3.14.5
RUBY_VERSION: 2.7
RUBY_PATCH: 5
- ALPINE_VERSION: 3.14.3
RUBY_VERSION: 2.7
RUBY_PATCH: 5
- ALPINE_VERSION: 3.15.0
- ALPINE_VERSION: 3.15.3
RUBY_VERSION: 3.0
RUBY_PATCH: 3

View file

@ -1,10 +1,8 @@
ARG ALPINE_VERSION=3.13.6
ARG BASE_IMAGE=alpine
ARG EMAIL=monit@sutty.nl
FROM ${BASE_IMAGE}:${ALPINE_VERSION} as build
ARG RUBY_VERSION=2.7
ARG RUBY_PATCH=5
ENV EMAIL ${EMAIL:-monit@sutty.nl}
RUN apk add --no-cache ruby~${RUBY_VERSION}.${RUBY_PATCH} patch

11
monitrc
View file

@ -5,17 +5,16 @@ set pidfile /run/monit.pid
set idfile /var/lib/monit/id
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
allow 172.0.0.0/8
check program nsupdate
with path "/usr/local/bin/nsupdate"
every 1 cycle
if status = 0 then unmonitor
check program zeroconf
with path "/usr/local/bin/zeroconf"
every 1 cycle
if status = 0 then unmonitor
include /etc/monit.d/*.conf

16
zeroconf.conf Normal file
View file

@ -0,0 +1,16 @@
set mmonit http://@@MMONIT@@/collector
set mailserver postfix port 25 using hostname @@HOSTNAME@@
set alert @@EMAIL@@
set mail-format {
from: Monit <@@EMAIL_FROM@@>
subject: $HOST
message: $ACTION $SERVICE -- $DATE: $DESCRIPTION.
}
set httpd port 2812
allow localhost
allow 172.0.0.0/8
allow "fd00:acab::/32"
allow @@CREDENTIALS@@

19
zeroconf.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/sh
set -e
test ! -f /etc/monit.d/zeroconf.conf || exit 0
test -n "${EMAIL}"
test -n "${EMAIL_FROM}"
test -n "${MMONIT}"
test -n "${CREDENTIALS}"
sed -re "s/@@EMAIL@@/${EMAIL}/" \
-e "s/@@EMAIL_FROM@@/${EMAIL_FROM}/" \
-e "s/@@HOSTNAME@@/${EMAIL_FROM#*@}/" \
-e "s/@@MMONIT@@/${MMONIT}/" \
-e "s/@@CREDENTIALS@@/${CREDENTIALS}/" \
/etc/zeroconf.conf > /etc/monit.d/zeroconf.conf
monit -t
monit reload