From e47dd5c78b2ea973fc0d0f5a50364fa11b7952be Mon Sep 17 00:00:00 2001 From: Baptiste Mille-Mathias Date: Sun, 10 Dec 2023 22:24:31 +0100 Subject: [PATCH] Separate data and config directory Add a new directory /data to put the shares in and config where the config stays. Do not create default share by default Fixes #67 --- Dockerfile | 3 ++- Dockerfile.aarch64 | 3 ++- readme-vars.yml | 4 ++-- root/etc/s6-overlay/s6-rc.d/svc-syncthing/run | 6 +++--- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index fd9d637..976fb10 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,7 +43,7 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA LABEL maintainer="thelamer" # environment settings -ENV HOME="/config" +ENV HOME="/data" RUN \ echo "**** create var lib folder ****" && \ @@ -57,3 +57,4 @@ COPY root/ / # ports and volumes EXPOSE 8384 22000/tcp 22000/udp 21027/UDP VOLUME /config +VOLUME /data diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 1718213..8c434b5 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -43,7 +43,7 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA LABEL maintainer="thelamer" # environment settings -ENV HOME="/config" +ENV HOME="/data" RUN \ echo "**** create var lib folder ****" && \ @@ -57,3 +57,4 @@ COPY root/ / # ports and volumes EXPOSE 8384 22000/tcp 22000/udp 21027/UDP VOLUME /config +VOLUME /data diff --git a/readme-vars.yml b/readme-vars.yml index ab1c534..04cb7e1 100755 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -22,8 +22,7 @@ param_env_vars: param_usage_include_vols: true param_volumes: - {vol_path: "/config", vol_host_path: "/path/to/appdata/config", desc: "Configuration files."} - - {vol_path: "/data1", vol_host_path: "/path/to/data1", desc: "Data1"} - - {vol_path: "/data2", vol_host_path: "/path/to/data2", desc: "Data2"} + - {vol_path: "/data", vol_host_path: "/path/to/data", desc: "Dedicated data directory"} param_usage_include_ports: true param_ports: - {external_port: "8384", internal_port: "8384", port_desc: "Application WebUI"} @@ -35,6 +34,7 @@ app_setup_block_enabled: true app_setup_block: "**Note: ** The Syncthing devs highly suggest setting a password for this container as it listens on 0.0.0.0. To do this go to `Actions -> Settings -> set user/password` for the webUI." # changelog changelogs: + - {date: "10.12.23:", desc: "Add a dedicated data directory volume"} - {date: "05.09.23:", desc: "Rebase to Alpine 3.18."} - {date: "01.07.23:", desc: "Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)"} - {date: "13.02.23:", desc: "Rebase to Alpine 3.17, migrate to s6v3."} diff --git a/root/etc/s6-overlay/s6-rc.d/svc-syncthing/run b/root/etc/s6-overlay/s6-rc.d/svc-syncthing/run index de03729..6a6c1e8 100755 --- a/root/etc/s6-overlay/s6-rc.d/svc-syncthing/run +++ b/root/etc/s6-overlay/s6-rc.d/svc-syncthing/run @@ -3,6 +3,6 @@ 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" + s6-setuidgid abc syncthing --config=/config --data=/data \ + --no-browser --no-restart --gui-address="0.0.0.0:8384" \ + --no-default-folder