Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-ruby into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
commit
29f3887174
6 changed files with 56 additions and 53 deletions
|
@ -1,7 +1,9 @@
|
|||
pipeline:
|
||||
publish:
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: registry.nulo.in
|
||||
username: sutty
|
||||
repo: registry.nulo.in/sutty/rails
|
||||
tags:
|
||||
- ${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH}
|
||||
|
@ -11,24 +13,20 @@ pipeline:
|
|||
- RUBY_PATCH=${RUBY_PATCH}
|
||||
- ALPINE_VERSION=${ALPINE_VERSION}
|
||||
- BASE_IMAGE=registry.nulo.in/sutty/ruby
|
||||
username: sutty
|
||||
purge: false
|
||||
secrets:
|
||||
- docker_password
|
||||
cache_from: registry.nulo.in/sutty/rails:${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
|
||||
|
|
11
monitrc
11
monitrc
|
@ -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
|
||||
|
|
26
nsupdate.sh
26
nsupdate.sh
|
@ -1,26 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Registers the local IPv6 address to the DNS
|
||||
|
||||
IP6="`whatsmyip6`"
|
||||
KNOT="${KNOT:-${IP6}}"
|
||||
|
||||
test -z "${IP6}" && exit 1
|
||||
test -z "${KNOT}" && exit 1
|
||||
test -z "${DOMAIN}" && exit 1
|
||||
|
||||
# Add a dot if the hostname contains the domain
|
||||
echo "${HOSTNAME}" | grep -q "\.${DOMAIN}$" && DOT="."
|
||||
|
||||
knsupdate <<DNS
|
||||
server ${KNOT}
|
||||
zone ${DOMAIN}.
|
||||
origin ${DOMAIN}.
|
||||
ttl 60
|
||||
del ${HOSTNAME}${DOT} AAAA
|
||||
add ${HOSTNAME}${DOT} AAAA ${IP6}
|
||||
send
|
||||
quit
|
||||
DNS
|
||||
|
||||
exit $?
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
ip address show ${1:-eth0} | grep inet6 | grep global | tr -s " " | cut -d " " -f 3 | cut -d / -f 1
|
16
zeroconf.conf
Normal file
16
zeroconf.conf
Normal 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
19
zeroconf.sh
Executable 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
|
Loading…
Reference in a new issue