Bladeren bron

Merge pull request #326 from bperel/rss

Support transmission-rss plugin
master
Kristian Haugene 6 jaren geleden
bovenliggende
commit
a8c8c96667
No account linked to committer's email address

+ 1
- 0
DockerEnv Bestand weergeven

@@ -3,6 +3,7 @@
#OPENVPN_CONFIG=
#OPENVPN_USERNAME=
#OPENVPN_PASSWORD=
#RSS_URL=
#LOCAL_NETWORK=
#ENABLE_UFW=false
#TRANSMISSION_ALT_SPEED_DOWN=50

+ 9
- 0
README.md Bestand weergeven

@@ -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`|
|`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
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

+ 10
- 0
docker-compose-armhf.yml Bestand weergeven

@@ -37,3 +37,13 @@ services:
- "8080:8080"
volumes:
- /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

+ 7
- 0
docker-compose.yml Bestand weergeven

@@ -30,3 +30,10 @@ services:
- 8080:8080
volumes:
- /etc/localtime:/etc/localtime:ro

rss:
image: haugene/transmission-rss
links:
- transmission
environment:
- RSS_URL=http://.../xxxxx.rss

+ 16
- 0
plugins/rss/Dockerfile Bestand weergeven

@@ -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
- 0
plugins/rss/Dockerfile.armhf Bestand weergeven

@@ -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
- 0
plugins/rss/environment-variables.tmpl Bestand weergeven

@@ -0,0 +1,4 @@
#! /bin/sh

export TRANSMISSION_DOWNLOAD_DIR={{ .Env.TRANSMISSION_DOWNLOAD_DIR }}
export RSS_URL="{{ .Env.RSS_URL }}"

+ 13
- 0
plugins/rss/start.sh Bestand weergeven

@@ -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
- 0
plugins/rss/transmission-rss.tmpl Bestand weergeven

@@ -0,0 +1,7 @@
feeds:
- url: {{ .Env.RSS_URL }}
download_path: {{ .Env.TRANSMISSION_DOWNLOAD_DIR }}
server:
host: transmission
port: 9091
rpc_path: /transmission/rpc

Laden…
Annuleren
Opslaan