From 933d6de918965ab1710ec313f32f45eac5352f38 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Mon, 13 Feb 2023 14:38:47 +0000 Subject: [PATCH] Rebase to 3.17, migrate to s6v3 --- .editorconfig | 2 +- .github/workflows/call_invalid_helper.yml | 12 ++++ .github/workflows/greetings.yml | 2 +- .github/workflows/permissions.yml | 9 +++ Dockerfile | 62 +++++++++---------- Dockerfile.aarch64 | 62 +++++++++---------- Dockerfile.armhf | 62 +++++++++---------- Jenkinsfile | 26 ++++---- README.md | 10 +-- readme-vars.yml | 1 + .../dependencies.d/init-config | 0 .../dependencies.d/init-services | 0 .../s6-rc.d/svc-syncthing/notification-fd | 1 + root/etc/s6-overlay/s6-rc.d/svc-syncthing/run | 8 +++ .../etc/s6-overlay/s6-rc.d/svc-syncthing/type | 1 + .../s6-rc.d/user/contents.d/svc-syncthing | 0 root/etc/services.d/syncthing/run | 11 ---- 17 files changed, 143 insertions(+), 126 deletions(-) create mode 100644 .github/workflows/call_invalid_helper.yml create mode 100644 .github/workflows/permissions.yml create mode 100644 root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-config create mode 100644 root/etc/s6-overlay/s6-rc.d/svc-syncthing/dependencies.d/init-services create mode 100644 root/etc/s6-overlay/s6-rc.d/svc-syncthing/notification-fd create mode 100755 root/etc/s6-overlay/s6-rc.d/svc-syncthing/run create mode 100644 root/etc/s6-overlay/s6-rc.d/svc-syncthing/type create mode 100644 root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-syncthing delete mode 100644 root/etc/services.d/syncthing/run diff --git a/.editorconfig b/.editorconfig index a92f7df..5f150f3 100755 --- a/.editorconfig +++ b/.editorconfig @@ -15,6 +15,6 @@ trim_trailing_whitespace = false indent_style = space indent_size = 2 -[{**.sh,root/etc/cont-init.d/**,root/etc/services.d/**}] +[{**.sh,root/etc/s6-overlay/s6-rc.d/**,root/etc/cont-init.d/**,root/etc/services.d/**}] indent_style = space indent_size = 4 diff --git a/.github/workflows/call_invalid_helper.yml b/.github/workflows/call_invalid_helper.yml new file mode 100644 index 0000000..773767c --- /dev/null +++ b/.github/workflows/call_invalid_helper.yml @@ -0,0 +1,12 @@ +name: Comment on invalid interaction +on: + issues: + types: + - labeled +jobs: + add-comment-on-invalid: + if: github.event.label.name == 'invalid' + permissions: + issues: write + uses: linuxserver/github-workflows/.github/workflows/invalid-interaction-helper.yml@v1 + secrets: inherit diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index 40e09b0..c3115b7 100755 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -8,6 +8,6 @@ jobs: steps: - uses: actions/first-interaction@v1 with: - issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-syncthing/blob/master/.github/ISSUE_TEMPLATE/issue.bug.yml) or [feature](https://github.com/linuxserver/docker-syncthing/blob/master/.github/ISSUE_TEMPLATE/issue.feature.yml) issue templates!' + issue-message: 'Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.' pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-syncthing/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!' repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/permissions.yml b/.github/workflows/permissions.yml new file mode 100644 index 0000000..2df6b61 --- /dev/null +++ b/.github/workflows/permissions.yml @@ -0,0 +1,9 @@ +name: Permission check +on: + pull_request: + paths: + - '**/run' + - '**/finish' +jobs: + permission_check: + uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1 diff --git a/Dockerfile b/Dockerfile index 606696d..9fe833f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,42 +1,40 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:3.16 as buildstage +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine:3.17 as buildstage # build variables ARG SYNCTHING_RELEASE RUN \ echo "**** install build packages ****" && \ - apk add --no-cache \ - curl \ - g++ \ - gcc \ - git \ - go \ - tar + apk add --no-cache \ + build-base \ + go RUN \ -echo "**** fetch source code ****" && \ - if [ -z ${SYNCTHING_RELEASE+x} ]; then \ - SYNCTHING_RELEASE=$(curl -sX GET "https://api.github.com/repos/syncthing/syncthing/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]'); \ - fi && \ - mkdir -p \ - /tmp/sync && \ - curl -o \ - /tmp/syncthing-src.tar.gz -L \ - "https://github.com/syncthing/syncthing/archive/${SYNCTHING_RELEASE}.tar.gz" && \ - tar xf \ - /tmp/syncthing-src.tar.gz -C \ - /tmp/sync --strip-components=1 && \ - echo "**** compile syncthing ****" && \ - cd /tmp/sync && \ - go clean -modcache && \ - CGO_ENABLED=0 go run build.go \ - -no-upgrade \ - -version=${SYNCTHING_RELEASE} \ - build syncthing + echo "**** fetch source code ****" && \ + if [ -z ${SYNCTHING_RELEASE+x} ]; then \ + SYNCTHING_RELEASE=$(curl -sX GET "https://api.github.com/repos/syncthing/syncthing/releases/latest" \ + | awk '/tag_name/{print $4;exit}' FS='[""]'); \ + fi && \ + mkdir -p \ + /tmp/sync && \ + curl -o \ + /tmp/syncthing-src.tar.gz -L \ + "https://github.com/syncthing/syncthing/archive/${SYNCTHING_RELEASE}.tar.gz" && \ + tar xf \ + /tmp/syncthing-src.tar.gz -C \ + /tmp/sync --strip-components=1 && \ + echo "**** compile syncthing ****" && \ + cd /tmp/sync && \ + go clean -modcache && \ + CGO_ENABLED=0 go run build.go \ + -no-upgrade \ + -version=${SYNCTHING_RELEASE} \ + build syncthing ############## runtime stage ############## -FROM ghcr.io/linuxserver/baseimage-alpine:3.15 +FROM ghcr.io/linuxserver/baseimage-alpine:3.17 # set version label ARG BUILD_DATE @@ -48,9 +46,9 @@ LABEL maintainer="thelamer" ENV HOME="/config" RUN \ - echo "**** create var lib folder ****" && \ - install -d -o abc -g abc \ - /var/lib/syncthing + echo "**** create var lib folder ****" && \ + install -d -o abc -g abc \ + /var/lib/syncthing # copy files from build stage and local files COPY --from=buildstage /tmp/sync/syncthing /usr/bin/ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 515099b..e8bde66 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,42 +1,40 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.16 as buildstage +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.17 as buildstage # build variables ARG SYNCTHING_RELEASE RUN \ echo "**** install build packages ****" && \ - apk add --no-cache \ - curl \ - g++ \ - gcc \ - git \ - go \ - tar + apk add --no-cache \ + build-base \ + go RUN \ -echo "**** fetch source code ****" && \ - if [ -z ${SYNCTHING_RELEASE+x} ]; then \ - SYNCTHING_RELEASE=$(curl -sX GET "https://api.github.com/repos/syncthing/syncthing/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]'); \ - fi && \ - mkdir -p \ - /tmp/sync && \ - curl -o \ - /tmp/syncthing-src.tar.gz -L \ - "https://github.com/syncthing/syncthing/archive/${SYNCTHING_RELEASE}.tar.gz" && \ - tar xf \ - /tmp/syncthing-src.tar.gz -C \ - /tmp/sync --strip-components=1 && \ - echo "**** compile syncthing ****" && \ - cd /tmp/sync && \ - go clean -modcache && \ - CGO_ENABLED=0 go run build.go \ - -no-upgrade \ - -version=${SYNCTHING_RELEASE} \ - build syncthing + echo "**** fetch source code ****" && \ + if [ -z ${SYNCTHING_RELEASE+x} ]; then \ + SYNCTHING_RELEASE=$(curl -sX GET "https://api.github.com/repos/syncthing/syncthing/releases/latest" \ + | awk '/tag_name/{print $4;exit}' FS='[""]'); \ + fi && \ + mkdir -p \ + /tmp/sync && \ + curl -o \ + /tmp/syncthing-src.tar.gz -L \ + "https://github.com/syncthing/syncthing/archive/${SYNCTHING_RELEASE}.tar.gz" && \ + tar xf \ + /tmp/syncthing-src.tar.gz -C \ + /tmp/sync --strip-components=1 && \ + echo "**** compile syncthing ****" && \ + cd /tmp/sync && \ + go clean -modcache && \ + CGO_ENABLED=0 go run build.go \ + -no-upgrade \ + -version=${SYNCTHING_RELEASE} \ + build syncthing ############## runtime stage ############## -FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.15 +FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.17 # set version label ARG BUILD_DATE @@ -48,9 +46,9 @@ LABEL maintainer="thelamer" ENV HOME="/config" RUN \ - echo "**** create var lib folder ****" && \ - install -d -o abc -g abc \ - /var/lib/syncthing + echo "**** create var lib folder ****" && \ + install -d -o abc -g abc \ + /var/lib/syncthing # copy files from build stage and local files COPY --from=buildstage /tmp/sync/syncthing /usr/bin/ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 9b85329..32b5736 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,42 +1,40 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.16 as buildstage +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.17 as buildstage # build variables ARG SYNCTHING_RELEASE RUN \ echo "**** install build packages ****" && \ - apk add --no-cache \ - curl \ - g++ \ - gcc \ - git \ - go \ - tar + apk add --no-cache \ + build-base \ + go RUN \ -echo "**** fetch source code ****" && \ - if [ -z ${SYNCTHING_RELEASE+x} ]; then \ - SYNCTHING_RELEASE=$(curl -sX GET "https://api.github.com/repos/syncthing/syncthing/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]'); \ - fi && \ - mkdir -p \ - /tmp/sync && \ - curl -o \ - /tmp/syncthing-src.tar.gz -L \ - "https://github.com/syncthing/syncthing/archive/${SYNCTHING_RELEASE}.tar.gz" && \ - tar xf \ - /tmp/syncthing-src.tar.gz -C \ - /tmp/sync --strip-components=1 && \ - echo "**** compile syncthing ****" && \ - cd /tmp/sync && \ - go clean -modcache && \ - CGO_ENABLED=0 go run build.go \ - -no-upgrade \ - -version=${SYNCTHING_RELEASE} \ - build syncthing + echo "**** fetch source code ****" && \ + if [ -z ${SYNCTHING_RELEASE+x} ]; then \ + SYNCTHING_RELEASE=$(curl -sX GET "https://api.github.com/repos/syncthing/syncthing/releases/latest" \ + | awk '/tag_name/{print $4;exit}' FS='[""]'); \ + fi && \ + mkdir -p \ + /tmp/sync && \ + curl -o \ + /tmp/syncthing-src.tar.gz -L \ + "https://github.com/syncthing/syncthing/archive/${SYNCTHING_RELEASE}.tar.gz" && \ + tar xf \ + /tmp/syncthing-src.tar.gz -C \ + /tmp/sync --strip-components=1 && \ + echo "**** compile syncthing ****" && \ + cd /tmp/sync && \ + go clean -modcache && \ + CGO_ENABLED=0 go run build.go \ + -no-upgrade \ + -version=${SYNCTHING_RELEASE} \ + build syncthing ############## runtime stage ############## -FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.15 +FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.17 # set version label ARG BUILD_DATE @@ -48,9 +46,9 @@ LABEL maintainer="thelamer" ENV HOME="/config" RUN \ - echo "**** create var lib folder ****" && \ - install -d -o abc -g abc \ - /var/lib/syncthing + echo "**** create var lib folder ****" && \ + install -d -o abc -g abc \ + /var/lib/syncthing # copy files from build stage and local files COPY --from=buildstage /tmp/sync/syncthing /usr/bin/ diff --git a/Jenkinsfile b/Jenkinsfile index 7020217..20ee17e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -59,7 +59,7 @@ pipeline { env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/' env.PULL_REQUEST = env.CHANGE_ID - env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/stale.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml' + env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/stale.yml ./.github/workflows/call_invalid_helper.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml' } script{ env.LS_RELEASE_NUMBER = sh( @@ -815,19 +815,19 @@ pipeline { echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin if [ "${CI}" == "false" ]; then docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} - docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG} + docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG} fi for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} - docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} - docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-latest - docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-latest - docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-latest docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} + docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} + docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-latest docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} + docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} + docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-latest docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} if [ -n "${SEMVER}" ]; then docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${SEMVER} @@ -835,13 +835,13 @@ pipeline { docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${SEMVER} fi docker push ${MANIFESTIMAGE}:amd64-${META_TAG} - docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG} - docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG} - docker push ${MANIFESTIMAGE}:amd64-latest - docker push ${MANIFESTIMAGE}:arm32v7-latest - docker push ${MANIFESTIMAGE}:arm64v8-latest docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} + docker push ${MANIFESTIMAGE}:amd64-latest + docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG} + docker push ${MANIFESTIMAGE}:arm32v7-latest docker push ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} + docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG} + docker push ${MANIFESTIMAGE}:arm64v8-latest docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} if [ -n "${SEMVER}" ]; then docker push ${MANIFESTIMAGE}:amd64-${SEMVER} @@ -987,12 +987,12 @@ pipeline { sh 'echo "build aborted"' } else if (currentBuild.currentResult == "SUCCESS"){ - sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 1681177,\ + sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/jenkins-avatar.png","embeds": [{"color": 1681177,\ "description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** Success\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\ "username": "Jenkins"}' ${BUILDS_DISCORD} ''' } else { - sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 16711680,\ + sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/jenkins-avatar.png","embeds": [{"color": 16711680,\ "description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** failure\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\ "username": "Jenkins"}' ${BUILDS_DISCORD} ''' } diff --git a/README.md b/README.md index 785b2d2..f42ea1d 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ The architectures supported by this image are: | :----: | :----: | ---- | | x86-64 | ✅ | amd64-\ | | arm64 | ✅ | arm64v8-\ | -| armhf| ✅ | arm32v7-\ | +| armhf | ✅ | arm32v7-\ | ## Application Setup @@ -79,7 +79,7 @@ services: environment: - PUID=1000 - PGID=1000 - - TZ=Europe/London + - TZ=Etc/UTC volumes: - /path/to/appdata/config:/config - /path/to/data1:/data1 @@ -100,7 +100,7 @@ docker run -d \ --hostname=syncthing `#optional` \ -e PUID=1000 \ -e PGID=1000 \ - -e TZ=Europe/London \ + -e TZ=Etc/UTC \ -p 8384:8384 \ -p 22000:22000/tcp \ -p 22000:22000/udp \ @@ -110,6 +110,7 @@ docker run -d \ -v /path/to/data2:/data2 \ --restart unless-stopped \ lscr.io/linuxserver/syncthing:latest + ``` ## Parameters @@ -125,7 +126,7 @@ Container images are configured using parameters passed at runtime (such as thos | `-p 21027/udp` | Protocol discovery | | `-e PUID=1000` | for UserID - see below for explanation | | `-e PGID=1000` | for GroupID - see below for explanation | -| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London. | +| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). | | `-v /config` | Configuration files. | | `-v /data1` | Data1 | | `-v /data2` | Data2 | @@ -239,6 +240,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **13.02.23:** - Rebase to Alpine 3.17, migrate to s6v3. * **17.08.22:** - Build on alpine 3.16 for go 1.18). * **03.05.22:** - Rebase to alpine 3.15 (builds on edge for go 1.18). * **05.10.21:** - Rebase to alpine 3.14. diff --git a/readme-vars.yml b/readme-vars.yml index c4f1933..fe146a5 100755 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -40,6 +40,7 @@ app_setup_block: "**Note: ** The Syncthing devs highly suggest setting a passwor # changelog changelogs: + - { date: "13.02.23:", desc: "Rebase to Alpine 3.17, migrate to s6v3." } - { date: "17.08.22:", desc: "Build on alpine 3.16 for go 1.18)." } - { date: "03.05.22:", desc: "Rebase to alpine 3.15 (builds on edge for go 1.18)." } - { date: "05.10.21:", desc: "Rebase to alpine 3.14." } diff --git a/root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-config b/root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/svc-syncthing/dependencies.d/init-services b/root/etc/s6-overlay/s6-rc.d/svc-syncthing/dependencies.d/init-services new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/svc-syncthing/notification-fd b/root/etc/s6-overlay/s6-rc.d/svc-syncthing/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-syncthing/notification-fd @@ -0,0 +1 @@ +3 diff --git a/root/etc/s6-overlay/s6-rc.d/svc-syncthing/run b/root/etc/s6-overlay/s6-rc.d/svc-syncthing/run new file mode 100755 index 0000000..de03729 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-syncthing/run @@ -0,0 +1,8 @@ +#!/usr/bin/with-contenv bash +# shellcheck shell=bash + +exec \ + s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 8384" \ + s6-setuidgid abc syncthing \ + -home=/config -no-browser -no-restart \ + --gui-address="0.0.0.0:8384" diff --git a/root/etc/s6-overlay/s6-rc.d/svc-syncthing/type b/root/etc/s6-overlay/s6-rc.d/svc-syncthing/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-syncthing/type @@ -0,0 +1 @@ +longrun diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-syncthing b/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-syncthing new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/services.d/syncthing/run b/root/etc/services.d/syncthing/run deleted file mode 100644 index d5739ad..0000000 --- a/root/etc/services.d/syncthing/run +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/with-contenv bash - -if [ -n "${UMASK_SET}" ] && [ -z "${UMASK}" ]; then - echo -e "You are using a legacy method of defining umask\nplease update your environment variable from UMASK_SET to UMASK\nto keep the functionality after July 2021" - umask ${UMASK_SET} -fi - -exec \ - s6-setuidgid abc syncthing \ - -home=/config -no-browser -no-restart \ - --gui-address="0.0.0.0:8384"