Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,12 @@ To disable it, set the environment variable:
- WEBUI_ENABLED=false
```

If you are running the container on a shared pod, and wish to change the port on which the web UI listens to, set the environment variable:

```yml
- WEBUI_PORT=18265
```

Thanks to [EricH9958](https://github.com/EricH9958/Soularr-Dashboard) for making the original dashboard for Soularr.

## Running Manually
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
#Script interval in seconds
- SCRIPT_INTERVAL=300
- WEBUI_ENABLED=true
- WEBUI_PORT=8265
user: "1000:1000"
ports:
#Web UI port
Expand Down
15 changes: 14 additions & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,20 @@ INTERVAL=${SCRIPT_INTERVAL:-300}

# Start the web UI in the background (default enabled)
if [ "${WEBUI_ENABLED:-true}" = "true" ]; then
python -u /app/webui/webui.py "$@" &

# If WEBUI_PORT is set, change the default listening port
_WEBUI_ARGS=()
if [ -n "${WEBUI_PORT:-}" ]; then
_NUMBERRE='^[0-9]+$'

if [[ "${WEBUI_PORT}" =~ $_NUMBERRE ]]; then
_WEBUI_ARGS+=("--port" "${WEBUI_PORT}")
else
echo "WEBUI_PORT is not numeric, ignoring." 1>&2
fi
fi

python -u /app/webui/webui.py "${_WEBUI_ARGS[@]}" "$@" &
fi

while true; do
Expand Down
Loading