Use the build release version from Flood instead of building ourselves (#1759) (#1761)

Co-authored-by: Johan <johman10@users.noreply.github.com>
This commit is contained in:
Patrick Kishino 2021-03-08 20:12:00 +09:00 committed by GitHub
parent 69d098b9d9
commit 25fd7225cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 16 deletions

View File

@ -1,12 +1,3 @@
# Build Flood UI seperately to keep image size small
FROM node:15.7.0-alpine3.12 AS FloodUIBuilder
WORKDIR /tmp/flood
RUN echo "Build Flood UI" \
&& wget -qO- https://github.com/johman10/flood-for-transmission/archive/master.tar.gz | tar xz -C . --strip=1 \
&& npm ci \
&& npm run build
FROM alpine:3.13 FROM alpine:3.13
VOLUME /data VOLUME /data
@ -16,6 +7,8 @@ RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /et
&& apk --no-cache add bash dumb-init ip6tables ufw@community openvpn shadow transmission-daemon transmission-cli \ && apk --no-cache add bash dumb-init ip6tables ufw@community openvpn shadow transmission-daemon transmission-cli \
curl jq tzdata openrc tinyproxy tinyproxy-openrc openssh unrar git \ curl jq tzdata openrc tinyproxy tinyproxy-openrc openssh unrar git \
&& mkdir -p /opt/transmission-ui \ && mkdir -p /opt/transmission-ui \
&& echo "Install Flood for Transmission" \
&& wget -qO- https://github.com/johman10/flood-for-transmission/releases/download/latest/flood-for-transmission.tar.gz | tar xz -C /opt/transmission-ui \
&& echo "Install Combustion" \ && echo "Install Combustion" \
&& wget -qO- https://github.com/Secretmapper/combustion/archive/release.tar.gz | tar xz -C /opt/transmission-ui \ && wget -qO- https://github.com/Secretmapper/combustion/archive/release.tar.gz | tar xz -C /opt/transmission-ui \
&& echo "Install kettu" \ && echo "Install kettu" \
@ -33,9 +26,6 @@ RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /et
&& useradd -u 911 -U -d /config -s /bin/false abc \ && useradd -u 911 -U -d /config -s /bin/false abc \
&& usermod -G users abc && usermod -G users abc
# Bring over flood UI from previous build stage
COPY --from=FloodUIBuilder /tmp/flood/public /opt/transmission-ui/flood
# Add configuration and scripts # Add configuration and scripts
ADD openvpn/ /etc/openvpn/ ADD openvpn/ /etc/openvpn/
ADD transmission/ /etc/transmission/ ADD transmission/ /etc/transmission/

View File

@ -56,7 +56,7 @@ By default the startup script applies a default set of permissions and ownership
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. 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), [Kettu](https://github.com/endor/kettu), [Transmission-Web-Control](https://github.com/ronggang/transmission-web-control/), and [Flood](https://github.com/johman10/flood-for-transmission) come bundled with the container. You can enable one of them by setting`TRANSMISSION_WEB_UI=combustion`, `TRANSMISSION_WEB_UI=kettu`, `TRANSMISSION_WEB_UI=transmission-web-control`, or `TRANSMISSION_WEB_UI=flood` respectively. Note that this will override the `TRANSMISSION_WEB_HOME` variable if set. [Combustion UI](https://github.com/Secretmapper/combustion), [Kettu](https://github.com/endor/kettu), [Transmission-Web-Control](https://github.com/ronggang/transmission-web-control/), and [Flood for Transmission](https://github.com/johman10/flood-for-transmission) come bundled with the container. You can enable one of them by setting`TRANSMISSION_WEB_UI=combustion`, `TRANSMISSION_WEB_UI=kettu`, `TRANSMISSION_WEB_UI=transmission-web-control`, or `TRANSMISSION_WEB_UI=flood` respectively. Note that this will override the `TRANSMISSION_WEB_HOME` variable if set.
| Variable | Function | Example | | Variable | Function | Example |
| ----------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | ----------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |

View File

@ -42,8 +42,8 @@ if [[ "transmission-web-control" = "$TRANSMISSION_WEB_UI" ]]; then
fi fi
if [[ "flood" = "$TRANSMISSION_WEB_UI" ]]; then if [[ "flood" = "$TRANSMISSION_WEB_UI" ]]; then
echo "Using Transmission Web Control UI, overriding TRANSMISSION_WEB_HOME" echo "Using Flood for Transmission UI, overriding TRANSMISSION_WEB_HOME"
export TRANSMISSION_WEB_HOME=/opt/transmission-ui/flood export TRANSMISSION_WEB_HOME=/opt/transmission-ui/flood-for-transmission
fi fi
echo "Updating Transmission settings.json with values from env variables" echo "Updating Transmission settings.json with values from env variables"