Skip to content

Commit

Permalink
link home folder to filebrawser mount
Browse files Browse the repository at this point in the history
  • Loading branch information
k0gen committed Apr 18, 2024
1 parent e5e1e39 commit cec2244
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ FROM syncthing/syncthing:1.27.6 AS build
RUN apk add --no-cache curl tini inotify-tools yq && \
rm -rf /var/cache/apk/*

RUN ln -s /mnt/filebrowser/syncthing /home/syncthing_user
RUN adduser --disabled-password syncthing_user

COPY docker_files/* /usr/local/bin

ENV STGUIADDRESS=0.0.0.0:8384
ENV HOME="/mnt/filebrowser/syncthing"
ENV STHOMEDIR="/mnt/filebrowser/syncthing/.config/syncthing"

EXPOSE 8384/tcp
EXPOSE 22000/tcp
Expand Down
3 changes: 2 additions & 1 deletion docker_files/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ ln -s $STHOMEDIR /var/syncthing/config
mkdir -p $HOME
chown -R syncthing_user $HOME

su-exec syncthing_user syncthing generate --no-default-folder --no-default-folder --skip-port-probing --gui-user=$SU --gui-password=$SP
su-exec syncthing_user syncthing generate --no-default-folder --skip-port-probing --gui-user=$SU --gui-password=$SP

echo "Adjusting Syncthing Default Settings"
yq -i -p xml -o xml '.configuration.options.urAccepted = "-1"' $STHOMEDIR/config.xml
yq -i -p xml -o xml '.configuration.gui.address = "0.0.0.0:8384"' $STHOMEDIR/config.xml
yq -i -p xml -o xml '.configuration.device.autoAcceptFolders = "true"' $STHOMEDIR/config.xml
yq -i -p xml -o xml '.configuration.defaults.device.+@introducer = "true"' $STHOMEDIR/config.xml

Expand Down

0 comments on commit cec2244

Please sign in to comment.