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,7 +1,9 @@
pipeline:
publish:
image: plugins/docker
settings:
registry: registry.nulo.in
username: sutty
repo: registry.nulo.in/sutty/syncthing
tags:
- ${ALPINE_VERSION}
@ -9,14 +11,14 @@ pipeline:
build_args:
- ALPINE_VERSION=${ALPINE_VERSION}
- BASE_IMAGE=registry.nulo.in/sutty/monit
username: sutty
secrets:
- docker_password
when:
branch: antifascista
event: push
matrix:
ALPINE_VERSION:
- 3.13.6
- 3.14.2
- 3.16.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}
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
# they are not synced.
RUN addgroup -g 82 -S syncthing
RUN adduser -s /bin/sh -G syncthing -D -u 1000 -h /home/syncthing syncthing
RUN getent group 82 || addgroup -g 82 -S www-data
RUN adduser -s /bin/sh -G www-data -D -u 1000 -h /home/syncthing syncthing
RUN apk add --no-cache ca-certificates daemonize syncthing
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/udp

View file

@ -1,3 +1,6 @@
check process syncthing with pidfile /tmp/syncthing.pid
start program = "/usr/local/bin/syncthing_start"
stop program = "/bin/sh -c 'cat /tmp/syncthing.pid | xargs kill'"
start program = "/usr/local/bin/syncthingd start"
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