diff --git a/Dockerfile b/Dockerfile index 301c930..240d7c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/docker_files/entrypoint.sh b/docker_files/entrypoint.sh index c20c81b..c56dd23 100755 --- a/docker_files/entrypoint.sh +++ b/docker_files/entrypoint.sh @@ -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