Merge pull request #326 from bperel/rss
Support transmission-rss plugin
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
#OPENVPN_CONFIG=
|
#OPENVPN_CONFIG=
|
||||||
#OPENVPN_USERNAME=
|
#OPENVPN_USERNAME=
|
||||||
#OPENVPN_PASSWORD=
|
#OPENVPN_PASSWORD=
|
||||||
|
#RSS_URL=
|
||||||
#LOCAL_NETWORK=
|
#LOCAL_NETWORK=
|
||||||
#ENABLE_UFW=false
|
#ENABLE_UFW=false
|
||||||
#TRANSMISSION_ALT_SPEED_DOWN=50
|
#TRANSMISSION_ALT_SPEED_DOWN=50
|
||||||
|
@@ -148,6 +148,15 @@ You may set the following parameters to customize the user id that runs transmis
|
|||||||
|`PUID` | Sets the user id who will run transmission | `PUID=1003`|
|
|`PUID` | Sets the user id who will run transmission | `PUID=1003`|
|
||||||
|`PGID` | Sets the group id for the transmission user | `PGID=1003` |
|
|`PGID` | Sets the group id for the transmission user | `PGID=1003` |
|
||||||
|
|
||||||
|
### RSS plugin
|
||||||
|
|
||||||
|
The Transmission RSS plugin can optionally be run as a separate container. It allow to download torrents based on an RSS URL, see [Plugin page](https://github.com/nning/transmission-rss).
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker run -d -e "RSS_URL=http://.../xxxxx.rss" \
|
||||||
|
--link <transmission-container>:transmission \--link
|
||||||
|
```
|
||||||
|
|
||||||
#### Use docker env file
|
#### Use docker env file
|
||||||
Another way is to use a docker env file where you can easily store all your env variables and maintain multiple configurations for different providers.
|
Another way is to use a docker env file where you can easily store all your env variables and maintain multiple configurations for different providers.
|
||||||
In the GitHub repository there is a provided DockerEnv file with all the current transmission and openvpn environment variables. You can use this to create local configurations
|
In the GitHub repository there is a provided DockerEnv file with all the current transmission and openvpn environment variables. You can use this to create local configurations
|
||||||
|
@@ -37,3 +37,13 @@ services:
|
|||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
|
||||||
|
rss:
|
||||||
|
build:
|
||||||
|
context: ./plugins/rss
|
||||||
|
dockerfile: Dockerfile.armhf
|
||||||
|
image: haugene/rpi-transmission-plugin-rss
|
||||||
|
links:
|
||||||
|
- transmission
|
||||||
|
environment:
|
||||||
|
- RSS_URL=http://.../xxxxx.rss
|
||||||
|
@@ -30,3 +30,10 @@ services:
|
|||||||
- 8080:8080
|
- 8080:8080
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
|
||||||
|
rss:
|
||||||
|
image: haugene/transmission-rss
|
||||||
|
links:
|
||||||
|
- transmission
|
||||||
|
environment:
|
||||||
|
- RSS_URL=http://.../xxxxx.rss
|
||||||
|
16
plugins/rss/Dockerfile
Normal file
16
plugins/rss/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
FROM ubuntu:16.04
|
||||||
|
MAINTAINER Kristian Haugene
|
||||||
|
|
||||||
|
# Update packages and install software
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get -y upgrade \
|
||||||
|
&& apt-get -y install curl gcc make ruby2.3-dev \
|
||||||
|
&& gem install transmission-rss \
|
||||||
|
&& curl -L https://github.com/jwilder/dockerize/releases/download/v0.5.0/dockerize-linux-amd64-v0.5.0.tar.gz | tar -C /usr/local/bin -xzv
|
||||||
|
|
||||||
|
ADD . /etc/transmission-rss
|
||||||
|
|
||||||
|
ENV TRANSMISSION_DOWNLOAD_DIR=/data/completed \
|
||||||
|
RSS_URL=**None**
|
||||||
|
|
||||||
|
CMD ["/etc/transmission-rss/start.sh"]
|
16
plugins/rss/Dockerfile.armhf
Normal file
16
plugins/rss/Dockerfile.armhf
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
FROM resin/rpi-raspbian:jessie
|
||||||
|
MAINTAINER Kristian Haugene
|
||||||
|
|
||||||
|
# Update packages and install software
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get -y upgrade \
|
||||||
|
&& apt-get -y install curl gcc make ruby2.3-dev \
|
||||||
|
&& gem install transmission-rss \
|
||||||
|
&& curl -L https://github.com/jwilder/dockerize/releases/download/v0.2.0/dockerize-linux-armhf-v0.2.0.tar.gz | tar -C /usr/local/bin -xzv \
|
||||||
|
|
||||||
|
ADD . /etc/transmission-rss
|
||||||
|
|
||||||
|
ENV TRANSMISSION_DOWNLOAD_DIR=/data/completed \
|
||||||
|
RSS_URL=**None**
|
||||||
|
|
||||||
|
CMD ["/etc/transmission-rss/start.sh"]
|
4
plugins/rss/environment-variables.tmpl
Normal file
4
plugins/rss/environment-variables.tmpl
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
export TRANSMISSION_DOWNLOAD_DIR={{ .Env.TRANSMISSION_DOWNLOAD_DIR }}
|
||||||
|
export RSS_URL="{{ .Env.RSS_URL }}"
|
13
plugins/rss/start.sh
Executable file
13
plugins/rss/start.sh
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Source our persisted env variables from container startup
|
||||||
|
dockerize -template /etc/transmission-rss/environment-variables.tmpl:/etc/transmission-rss/environment-variables.sh
|
||||||
|
. /etc/transmission-rss/environment-variables.sh
|
||||||
|
|
||||||
|
if [ -z "${RSS_URL}" ] || [ "${RSS_URL}" = "**None**" ] ; then
|
||||||
|
echo "NO RSS URL CONFIGURED, IGNORING"
|
||||||
|
else
|
||||||
|
dockerize -template /etc/transmission-rss/transmission-rss.tmpl:/etc/transmission-rss.conf
|
||||||
|
echo "STARTING RSS PLUGIN"
|
||||||
|
transmission-rss
|
||||||
|
fi
|
7
plugins/rss/transmission-rss.tmpl
Normal file
7
plugins/rss/transmission-rss.tmpl
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
feeds:
|
||||||
|
- url: {{ .Env.RSS_URL }}
|
||||||
|
download_path: {{ .Env.TRANSMISSION_DOWNLOAD_DIR }}
|
||||||
|
server:
|
||||||
|
host: transmission
|
||||||
|
port: 9091
|
||||||
|
rpc_path: /transmission/rpc
|
Reference in New Issue
Block a user