Skip to content

Commit 8429838

Browse files
committed
Added a Web UI accesible via port 8265. Needs more testing and dev work. Logging to file must be enabled for the Web UI to read the log file.
1 parent 71b52f5 commit 8429838

15 files changed

Lines changed: 628 additions & 4 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.sh text eol=lf

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ FROM python:3.11
33
WORKDIR /app
44

55
COPY requirements.txt soularr.py run.sh .
6+
COPY webui/ webui/
7+
COPY resources/ resources/
68

79
RUN apt-get update \
810
&& apt-get install -y tini \
@@ -14,5 +16,7 @@ RUN apt-get update \
1416
ENV PYTHONUNBUFFERED=1
1517
ENV IN_DOCKER=Yes
1618

19+
EXPOSE 8265
20+
1721
ENTRYPOINT ["tini", "-g", "--"]
1822
CMD ["/app/run.sh"]

docker-compose.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ services:
44
restart: unless-stopped
55
container_name: soularr
66
hostname: soularr
7-
environment:
7+
environment:
88
- PUID=1000
99
- PGID=1000
1010
- TZ=Etc/UTC
1111
#Script interval in seconds
1212
- SCRIPT_INTERVAL=300
13+
- WEBUI_ENABLED=true
1314
user: "1000:1000"
15+
ports:
16+
#Web UI port
17+
- "8265:8265"
1418
volumes:
1519
#"You can set /downloads to whatever you want but will then need to change the Slskd download dir in your config file"
1620
- /path/to/slskd/downloads:/downloads

requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
music-tag==0.4.3
22
pyarr==5.2.0
3-
slskd-api==0.1.5
3+
slskd-api==0.1.5
4+
flask
5+
waitress

resources/favicon.ico

15 KB
Binary file not shown.

resources/github.svg

Lines changed: 3 additions & 0 deletions
Loading

resources/logs.svg

Lines changed: 7 additions & 0 deletions
Loading

resources/settings.svg

Lines changed: 4 additions & 0 deletions
Loading

resources/sponsor.svg

Lines changed: 3 additions & 0 deletions
Loading

run.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66

77
INTERVAL=${SCRIPT_INTERVAL:-300}
88

9+
# Start the web UI in the background (default enabled)
10+
if [ "${WEBUI_ENABLED:-true}" = "true" ]; then
11+
python -u /app/webui/webui.py "$@" &
12+
fi
13+
914
while true; do
1015
if ps aux | grep "[s]oularr.py" > /dev/null; then
1116
echo "Soularr is already running. Exiting..."
@@ -17,4 +22,4 @@ while true; do
1722
dt=$(date '+%d/%m/%Y %H:%M:%S');
1823
echo "$dt - Waiting for $INTERVAL seconds before checking again..."
1924
sleep $INTERVAL
20-
done
25+
done

0 commit comments

Comments
 (0)