Skip to content

Commit

Permalink
Add configurable WebUI PORT
Browse files Browse the repository at this point in the history
  • Loading branch information
wansyu committed Dec 22, 2023
1 parent 24c7d40 commit a0949c1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ LABEL maintainer="thelamer"

# environment settings
ENV HOME="/config"
ENV PORT=8384

RUN \
echo "**** create var lib folder ****" && \
Expand All @@ -55,5 +56,5 @@ COPY --from=buildstage /tmp/sync/syncthing /usr/bin/
COPY root/ /

# ports and volumes
EXPOSE 8384 22000/tcp 22000/udp 21027/UDP
EXPOSE ${PORT} 22000/tcp 22000/udp 21027/UDP
VOLUME /config
3 changes: 2 additions & 1 deletion Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ LABEL maintainer="thelamer"

# environment settings
ENV HOME="/config"
ENV PORT=8384

RUN \
echo "**** create var lib folder ****" && \
Expand All @@ -55,5 +56,5 @@ COPY --from=buildstage /tmp/sync/syncthing /usr/bin/
COPY root/ /

# ports and volumes
EXPOSE 8384 22000/tcp 22000/udp 21027/UDP
EXPOSE ${PORT} 22000/tcp 22000/udp 21027/UDP
VOLUME /config
3 changes: 3 additions & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ param_hostname_desc: "Optionally the hostname can be defined."
param_usage_include_env: true
param_env_vars:
- {env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London."}
opt_param_env_vars:
- {env_var: "PORT", env_value: "8384", desc: "Application WebUI listen Port" }
param_usage_include_vols: true
param_volumes:
- {vol_path: "/config", vol_host_path: "/path/to/appdata/config", desc: "Configuration files."}
Expand All @@ -35,6 +37,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: "22.12.23:", desc: "Add configurable WebUI PORT" }
- {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."}
Expand Down
4 changes: 2 additions & 2 deletions root/etc/s6-overlay/s6-rc.d/svc-syncthing/run
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# shellcheck shell=bash

exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 8384" \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${PORT}" \
s6-setuidgid abc syncthing \
-home=/config -no-browser -no-restart \
--gui-address="0.0.0.0:8384"
--gui-address="0.0.0.0:${PORT}"

0 comments on commit a0949c1

Please sign in to comment.