diff --git a/Dockerfile b/Dockerfile index ef8e02f4f..598d81a63 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ VOLUME /config # Update packages and install software RUN apt-get update \ && apt-get -y upgrade \ - && apt-get -y install software-properties-common wget \ + && apt-get -y install software-properties-common wget git \ && add-apt-repository ppa:transmissionbt/ppa \ && wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg | apt-key add - \ && echo "deb http://build.openvpn.net/debian/openvpn/stable xenial main" > /etc/apt/sources.list.d/openvpn-aptrepo.list \ @@ -16,6 +16,7 @@ RUN apt-get update \ && wget https://github.com/Secretmapper/combustion/archive/release.zip \ && unzip release.zip -d /opt/transmission-ui/ \ && rm release.zip \ + && git clone git://github.com/endor/kettu.git /opt/transmission-ui/kettu \ && wget https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb \ && dpkg -i dumb-init_1.2.0_amd64.deb \ && rm -rf dumb-init_1.2.0_amd64.deb \ @@ -104,7 +105,7 @@ ENV OPENVPN_USERNAME=**None** \ TRANSMISSION_WATCH_DIR_ENABLED=true \ TRANSMISSION_HOME=/data/transmission-home \ ENABLE_UFW=false \ - ENABLE_COMBUSTION_UI=false \ + TRANSMISSION_WEB_UI="" \ PUID="" \ PGID="" \ TRANSMISSION_WEB_HOME="" diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 28ed7f2f5..02b34aa9a 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -8,10 +8,11 @@ VOLUME /config RUN apt-get update \ && apt-get -y upgrade \ && apt-get -y install transmission-cli transmission-common transmission-daemon \ - && apt-get install -y openvpn curl ufw \ + && apt-get install -y openvpn curl ufw git\ && wget https://github.com/Secretmapper/combustion/archive/release.zip \ && unzip release.zip -d /opt/transmission-ui/ \ && rm release.zip \ + && git clone git://github.com/endor/kettu.git /opt/transmission-ui/kettu \ && curl -sLO https://archive.raspbian.org/raspbian/pool/main/d/dumb-init/dumb-init_1.0.3-1_armhf.deb \ && dpkg -i dumb-init_*.deb \ && rm -rf dumb-init_*.deb \ @@ -101,7 +102,7 @@ ENV OPENVPN_USERNAME=**None** \ TRANSMISSION_WATCH_DIR_ENABLED=true \ TRANSMISSION_HOME=/data/transmission-home \ ENABLE_UFW=false \ - ENABLE_COMBUSTION_UI=false \ + TRANSMISSION_WEB_UI=\ PUID=\ PGID=\ TRANSMISSION_WEB_HOME= diff --git a/README.md b/README.md index 08b11fa93..b1eecc0c5 100644 --- a/README.md +++ b/README.md @@ -111,12 +111,12 @@ If TRANSMISSION_PEER_PORT_RANDOM_ON_START is enabled then it allows traffic to t ### Alternative web UIs You can override the default web UI by setting the ```TRANSMISSION_WEB_HOME``` environment variable. If set, Transmission will look there for the Web Interface files, such as the javascript, html, and graphics files. -[Combustion UI](https://github.com/Secretmapper/combustion) comes bundled with the container. You can enable it by setting ```ENABLE_COMBUSTION_UI=true```. Note that this will override the ```TRANSMISSION_WEB_HOME``` variable if set. +[Combustion UI](https://github.com/Secretmapper/combustion) and [Kettu](https://github.com/endor/kettu) come bundled with the container. You can enable either of them by setting```TRANSMISSION_WEB_UI=combustion``` or ```TRANSMISSION_WEB_UI=kettu```, respectively. Note that this will override the ```TRANSMISSION_WEB_HOME``` variable if set. | Variable | Function | Example | |----------|----------|-------| |`TRANSMISSION_WEB_HOME` | Set Transmission web home | `TRANSMISSION_WEB_HOME=/path/to/web/ui`| -|`ENABLE_COMBUSTION_UI` | Use the bundled Combustion web UI | `ENABLE_COMBUSTION_UI=true`| +|`TRANSMISSION_WEB_UI` | Use the specified bundled web UI | `TRANSMISSION_WEB_UI=combustion` or `TRANSMISSION_WEB_UI=kettu`| ### Transmission configuration options diff --git a/transmission/environment-variables.tmpl b/transmission/environment-variables.tmpl index cfe5d1283..5ae9d6538 100644 --- a/transmission/environment-variables.tmpl +++ b/transmission/environment-variables.tmpl @@ -74,7 +74,7 @@ export TRANSMISSION_WATCH_DIR_ENABLED={{ .Env.TRANSMISSION_WATCH_DIR_ENABLED }} export OPENVPN_PROVIDER={{ .Env.OPENVPN_PROVIDER }} export ENABLE_UFW={{ .Env.ENABLE_UFW }} -export ENABLE_COMBUSTION_UI={{ .Env.ENABLE_COMBUSTION_UI }} +export TRANSMISSION_WEB_UI={{ .Env.TRANSMISSION_WEB_UI }} export PUID={{ .Env.PUID }} export PGID={{ .Env.PGID }} diff --git a/transmission/start.sh b/transmission/start.sh index aff7ae570..e6e53134b 100755 --- a/transmission/start.sh +++ b/transmission/start.sh @@ -8,11 +8,16 @@ echo "Updating TRANSMISSION_BIND_ADDRESS_IPV4 to the ip of $1 : $4" export TRANSMISSION_BIND_ADDRESS_IPV4=$4 -if [ "true" = "$ENABLE_COMBUSTION_UI" ]; then +if [ "combustion" = "$TRANSMISSION_WEB_UI" ]; then echo "Using Combustion UI, overriding TRANSMISSION_WEB_HOME" export TRANSMISSION_WEB_HOME=/opt/transmission-ui/combustion-release fi +if [ "kettu" = "$TRANSMISSION_WEB_UI" ]; then + echo "Using Kettu UI, overriding TRANSMISSION_WEB_HOME" + export TRANSMISSION_WEB_HOME=/opt/transmission-ui/kettu +fi + echo "Generating transmission settings.json from env variables" # Ensure TRANSMISSION_HOME is created mkdir -p ${TRANSMISSION_HOME}