Compare commits

..

20 commits

Author SHA1 Message Date
f
3c6e974166 actual syslogize path
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-09-10 18:26:04 -03:00
f
11cb290ae8 use syslog, start/stop correctly
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-09-10 18:16:39 -03:00
f
4f1f5c27d0 Merge branch 'antifascista' of https://gitea.nulo.in/Sutty/containers-skel into antifascista 2022-09-10 18:15:25 -03:00
f
0b354f4fea releases fixing zlib cve 2022-08-09 10:36:07 -03:00
f
9c4de359fb alpine upgrades 2022-07-19 18:48:03 -03:00
f
c90ba65374 alpine 3.16 2022-05-29 21:05:05 -03:00
f
4ac1583bcb CVE-2022-28391
https://security.alpinelinux.org/vuln/CVE-2022-28391
2022-04-04 16:08:10 -03:00
f
7d00d2cfd1 Merge branch 'antifascista' of https://gitea.nulo.in/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-04-04 10:39:32 -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
e565c1380a woodpecker-cli lint 2022-03-19 14:48:54 -03:00
f
65304feb56 alpine upgrade 2022-03-19 14:46:16 -03:00
f
da50f70e58 format
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-03-15 19:00:45 -03:00
f
a299ab663f newer versions first 2022-03-08 09:43:09 -03:00
f
689bc1a8f1 monitor shared folder 2022-03-07 17:14:53 -03:00
f
54fc589e00 fixes
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-03-07 16:55:47 -03:00
f
9a9ee411da alpine versions 2022-03-03 22:59:09 -03:00
f
08a7a764b1 copy stuff on last step 2022-03-02 13:06:38 -03:00
f
0a8dc2503c create data group only when needed
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
apparently the group started existing from alpine 3.14
2022-03-02 13:04:26 -03:00
f
e994542de5 general upgrade
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2022-03-02 12:53:58 -03:00
f
84191be98e there's no need for a two stage build
Some checks failed
continuous-integration/woodpecker the build failed
2021-10-23 14:14:48 -03:00
5 changed files with 45 additions and 36 deletions

View file

@ -1,22 +1,24 @@
pipeline: pipeline:
publish: publish:
image: plugins/docker image: plugins/docker
registry: registry.nulo.in settings:
repo: registry.nulo.in/sutty/syncthing registry: registry.nulo.in
tags: username: sutty
- ${ALPINE_VERSION} repo: registry.nulo.in/sutty/syncthing
- latest tags:
build_args: - ${ALPINE_VERSION}
- ALPINE_VERSION=${ALPINE_VERSION} - latest
- BASE_IMAGE=registry.nulo.in/sutty/monit build_args:
username: sutty - ALPINE_VERSION=${ALPINE_VERSION}
- BASE_IMAGE=registry.nulo.in/sutty/monit
secrets: secrets:
- docker_password - docker_password
when: when:
branch: antifascista branch: antifascista
event: push event: push
matrix: matrix:
ALPINE_VERSION: ALPINE_VERSION:
- 3.13.6 - 3.16.2
- 3.14.2 - 3.15.6
- 3.14.8
- 3.13.12

View file

@ -3,21 +3,15 @@ ARG BASE_IMAGE=sutty/monit
FROM ${BASE_IMAGE}:${ALPINE_VERSION} FROM ${BASE_IMAGE}:${ALPINE_VERSION}
MAINTAINER "f <f@sutty.nl>" MAINTAINER "f <f@sutty.nl>"
COPY ./syncthing_start.sh /usr/local/bin/syncthing_start
RUN chmod 755 /usr/local/bin/syncthing_start
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
ARG ALPINE_VERSION
# Syncthing runs with Sutty's uid and gid so ownership is kept, because # Syncthing runs with Sutty's uid and gid so ownership is kept, because
# they are not synced. # they are not synced.
RUN addgroup -g 82 -S syncthing RUN getent group 82 || addgroup -g 82 -S www-data
RUN adduser -s /bin/sh -G syncthing -D -u 1000 -h /home/syncthing syncthing RUN adduser -s /bin/sh -G www-data -D -u 1000 -h /home/syncthing syncthing
RUN apk add --no-cache ca-certificates daemonize syncthing RUN apk add --no-cache ca-certificates daemonize syncthing
COPY ./monit.conf /etc/monit.d/syncthing.conf COPY ./monit.conf /etc/monit.d/syncthing.conf
COPY --from=build /usr/local/bin/syncthing_start /usr/local/bin/syncthing_start COPY ./syncthingd.sh /usr/local/bin/syncthingd
EXPOSE 22000 EXPOSE 22000
EXPOSE 22000/udp EXPOSE 22000/udp

View file

@ -1,3 +1,6 @@
check process syncthing with pidfile /tmp/syncthing.pid check process syncthing with pidfile /tmp/syncthing.pid
start program = "/usr/local/bin/syncthing_start" start program = "/usr/local/bin/syncthingd start"
stop program = "/bin/sh -c 'cat /tmp/syncthing.pid | xargs kill'" stop program = "/usr/local/bin/syncthingd stop"
check filesystem root with path /home/syncthing/Sync
if space usage < 2% then alert

View file

@ -1,13 +0,0 @@
#!/bin/sh
pid=/tmp/syncthing.pid
dir=/home/syncthing
log=${dir}/syncthing.log
rm -f ${pid}
install -dm 2750 -o syncthing -g syncthing ${dir}/Sync/.stfolder
daemonize -p ${pid} -l ${pid} -u syncthing -c ${dir} \
-o ${log} -a -e ${log} \
/usr/bin/syncthing -no-browser -gui-address='http://0.0.0.0:8443'

23
syncthingd.sh Executable file
View file

@ -0,0 +1,23 @@
#!/bin/sh
pid=/tmp/syncthing.pid
dir=/home/syncthing
case $1 in
start)
install -dm 2750 -o syncthing -g syncthing ${dir}/Sync/.stfolder
daemonize -p ${pid} -l ${pid} -u syncthing -c ${dir} \
/usr/local/bin/syslogize \
/usr/bin/syncthing serve \
--gui-address=http://[::]:8384 \
--no-browser \
--no-restart \
--no-upgrade \
--unpaused
;;
stop)
test ! -f $pid || cat ${pid} | xargs -r kill
rm -f ${pid}
;;
esac