matterbridge
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
f 2022-03-19 15:14:29 -03:00
parent e565c1380a
commit 8f1b7c44e3
4 changed files with 29 additions and 1 deletions

View file

@ -4,7 +4,7 @@ pipeline:
settings:
registry: registry.nulo.in
username: sutty
repo: registry.nulo.in/sutty/CHANGEME
repo: registry.nulo.in/sutty/matterbridge
tags:
- ${ALPINE_VERSION}
- latest

View file

@ -2,3 +2,9 @@ ARG ALPINE_VERSION=3.13.6
ARG BASE_IMAGE=sutty/monit
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
MAINTAINER "f <f@sutty.nl>"
RUN apk add --no-cache matterbridge daemonize
COPY ./monit.conf /etc/monit.d/matterbridge.conf
COPY ./matterbridged.sh /usr/local/bin/matterbridged
VOLUME /srv/matterbridge

19
matterbridged.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/sh
set -e
pid=/run/matterbridge.pid
log=/tmp/matterbridge.log
cnf=/etc/matterbridge/matterbridge.toml
case $1 in
start)
daemonize -a -e ${log} -o ${log} -p ${pid} -l ${pid} /usr/bin/matterbridge -conf ${cnf}
;;
stop)
test -f ${pid} || exit 0
cat ${pid} | xargs -r kill
rm -f ${pid}
;;
esac

3
monit.conf Normal file
View file

@ -0,0 +1,3 @@
check process with pidfile /run/matterbridge.pid
start program = "/usr/local/bin/matterbridged start"
stop program = "/usr/local/bin/matterbridged stop"