Skip to content

Commit

Permalink
Separate data and config directory
Browse files Browse the repository at this point in the history
Add a new directory /data to put the shares in and config where the
config stays.
Do not create default share by default

Fixes linuxserver#67
  • Loading branch information
bmillemathias committed Dec 10, 2023
1 parent cb39b1e commit 7fa9e49
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ****" && \
Expand All @@ -57,3 +57,4 @@ COPY root/ /
# ports and volumes
EXPOSE 8384 22000/tcp 22000/udp 21027/UDP
VOLUME /config
VOLUME /data
3 changes: 2 additions & 1 deletion Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -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 ****" && \
Expand All @@ -57,3 +57,4 @@ COPY root/ /
# ports and volumes
EXPOSE 8384 22000/tcp 22000/udp 21027/UDP
VOLUME /config
VOLUME /data
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ services:
- TZ=Etc/UTC
volumes:
- /path/to/appdata/config:/config
- /path/to/data1:/data1
- /path/to/data2:/data2
- /path/to/data1:/data
ports:
- 8384:8384
- 22000:22000/tcp
Expand All @@ -105,8 +104,7 @@ docker run -d \
-p 22000:22000/udp \
-p 21027:21027/udp \
-v /path/to/appdata/config:/config \
-v /path/to/data1:/data1 \
-v /path/to/data2:/data2 \
-v /path/to/data1:/data \
--restart unless-stopped \
lscr.io/linuxserver/syncthing:latest
```
Expand All @@ -126,8 +124,7 @@ Containers are configured using parameters passed at runtime (such as those abov
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-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 |
| `-v /data` | Data root directory |

## Environment variables from files (Docker secrets)

Expand Down Expand Up @@ -305,6 +302,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **10.12.23:** - add a dedicated data directory volume
* **05.09.23:** - Rebase to Alpine 3.18.
* **01.07.23:** - Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)
* **13.02.23:** - Rebase to Alpine 3.17, migrate to s6v3.
Expand Down
6 changes: 3 additions & 3 deletions root/etc/s6-overlay/s6-rc.d/svc-syncthing/run
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7fa9e49

Please sign in to comment.