diff --git a/Dockerfile b/Dockerfile index 48b36149d..397109bd9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,9 @@ RUN apt-get update \ && add-apt-repository ppa:transmissionbt/ppa \ && apt-get update \ && apt-get install -y sudo transmission-cli transmission-common transmission-daemon curl rar unrar zip unzip wget \ + && wget -O /tmp/release.zip https://github.com/Secretmapper/combustion/archive/release.zip \ + && unzip -d /tmp /tmp/release.zip ; rm /tmp/*.zip \ + && mkdir /usr/bin/transmission-combustion/ ; mv /tmp/combustion-release/* /usr/bin/transmission-combustion/ \ && 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 \ && apt-get update \ @@ -107,6 +110,7 @@ ENV OPENVPN_USERNAME=**None** \ TRANSMISSION_WATCH_DIR_ENABLED=true \ TRANSMISSION_HOME=/data/transmission-home \ ENABLE_UFW=false \ + ENABLE_COMBUSTION_UI=false \ PUID=\ PGID=\ TRANSMISSION_WEB_HOME= diff --git a/Dockerfile.armhf b/Dockerfile.armhf index a403d421b..9df34a259 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -11,6 +11,9 @@ VOLUME /config # Update packages and install software RUN apt-get update \ && apt-get install -y transmission-cli transmission-common transmission-daemon \ + && wget -O /tmp/release.zip https://github.com/Secretmapper/combustion/archive/release.zip \ + && unzip -d /tmp /tmp/release.zip ; rm /tmp/*.zip \ + && mkdir /usr/bin/transmission-combustion/ ; mv /tmp/combustion-release/* /usr/bin/transmission-combustion/ \ && apt-get install -y openvpn curl ufw \ && 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 \ @@ -101,6 +104,7 @@ ENV OPENVPN_USERNAME=**None** \ TRANSMISSION_WATCH_DIR_ENABLED=true \ TRANSMISSION_HOME=/data/transmission-home \ ENABLE_UFW=false \ + ENABLE_COMBUSTION_UI=false \ PUID=\ PGID=\ TRANSMISSION_WEB_HOME= diff --git a/README.md b/README.md index a838ea673..74e2c54c6 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,16 @@ If TRANSMISSION_PEER_PORT_RANDOM_ON_START is enabled then it allows traffic to t |----------|----------|-------| |`ENABLE_UFW` | Enables the firewall | `ENABLE_UFW=true`| +### 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. + +| 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 configuration options You may override transmission options by setting the appropriate environment variable. diff --git a/transmission/environment-variables.tmpl b/transmission/environment-variables.tmpl index faa88a523..cfe5d1283 100644 --- a/transmission/environment-variables.tmpl +++ b/transmission/environment-variables.tmpl @@ -74,6 +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 PUID={{ .Env.PUID }} export PGID={{ .Env.PGID }} diff --git a/transmission/start.sh b/transmission/start.sh index 237a6c504..e8fb5d87b 100755 --- a/transmission/start.sh +++ b/transmission/start.sh @@ -8,6 +8,11 @@ echo "Updating TRANSMISSION_BIND_ADDRESS_IPV4 to the ip of $1 : $4" export TRANSMISSION_BIND_ADDRESS_IPV4=$4 +if [ "true" = "$ENABLE_COMBUSTION_UI" ]; then + echo "Using Combustion UI, overriding TRANSMISSION_WEB_HOME" + export TRANSMISSION_WEB_HOME=/usr/bin/transmission-combustion +fi + echo "Generating transmission settings.json from env variables" # Ensure TRANSMISSION_HOME is created mkdir -p ${TRANSMISSION_HOME}