├── Dockerfile ├── Dockerfile.aarch64 ├── Dockerfile.armhf ├── README.md ├── etc ├── cont-init.d │ ├── 20-update-flexget │ ├── 21-update-transmission │ ├── 22-update-deluge │ └── 30-set-web-passwd └── services.d │ └── flexget │ └── run ├── requirements.txt └── sample_config.yml /Dockerfile: -------------------------------------------------------------------------------- 1 | ############################################################################## 2 | # Source: https://github.com/linuxserver/docker-baseimage-alpine-python3/blob/master/Dockerfile 3 | # Simply using it as a baseimage fails: 4 | # - installing g++ fails (baseimage already installs it and purges it afterwards, so let's keep it) 5 | # - installing python 3.7.3 because that is what py3-libtorrent-rasterbar requires (doesn't work with 3.6.8) 6 | FROM lsiobase/alpine:3.10 7 | 8 | RUN apk add \ 9 | libxml2-dev \ 10 | libxslt-dev \ 11 | python3 \ 12 | python3-dev \ 13 | py3-lxml \ 14 | boost-python3 \ 15 | bash && \ 16 | echo "**** install alpine sdk so that we can build libtorrent python bindings (for various plugin) ****" && \ 17 | apk add alpine-sdk && \ 18 | abuild-keygen -ian && \ 19 | usermod -aG abuild root 20 | 21 | RUN \ 22 | echo "**** install build packages ****" && \ 23 | apk add --no-cache \ 24 | autoconf \ 25 | automake \ 26 | freetype-dev \ 27 | g++ \ 28 | gcc \ 29 | jpeg-dev \ 30 | lcms2-dev \ 31 | libffi-dev \ 32 | libpng-dev \ 33 | libwebp-dev \ 34 | linux-headers \ 35 | make \ 36 | openjpeg-dev \ 37 | openssl-dev \ 38 | tiff-dev \ 39 | zlib-dev && \ 40 | echo "**** install runtime packages ****" && \ 41 | apk add --no-cache \ 42 | curl \ 43 | freetype \ 44 | git \ 45 | lcms2 \ 46 | libjpeg-turbo \ 47 | libwebp \ 48 | openjpeg \ 49 | openssl \ 50 | p7zip \ 51 | tar \ 52 | tiff \ 53 | unrar \ 54 | unzip \ 55 | vnstat \ 56 | wget \ 57 | xz \ 58 | zlib && \ 59 | echo "**** use ensure to check for pip and link /usr/bin/pip3 to /usr/bin/pip ****" && \ 60 | python3 -m ensurepip && \ 61 | rm -r /usr/lib/python*/ensurepip && \ 62 | if \ 63 | [ ! -e /usr/bin/pip ]; then \ 64 | ln -s /usr/bin/pip3 /usr/bin/pip ; fi && \ 65 | echo "**** install pip packages ****" && \ 66 | pip install --no-cache-dir -U \ 67 | pip \ 68 | setuptools && \ 69 | pip install -U \ 70 | configparser \ 71 | ndg-httpsclient \ 72 | notify \ 73 | paramiko \ 74 | pillow \ 75 | psutil \ 76 | pyopenssl \ 77 | requests \ 78 | setuptools \ 79 | urllib3 \ 80 | virtualenv && \ 81 | echo "**** build libtorrent-rasterbar, this takes a bit ****" && \ 82 | mkdir -p /build/py3-libtorrent-rasterbar && \ 83 | cd /build/py3-libtorrent-rasterbar && \ 84 | wget https://git.alpinelinux.org/aports/plain/testing/libtorrent-rasterbar/APKBUILD && \ 85 | abuild -F checksum && abuild -Fr && \ 86 | apk add --repository /root/packages/build py3-libtorrent-rasterbar && \ 87 | echo "**** clean up ****" && \ 88 | rm -rf \ 89 | /root/.cache \ 90 | /tmp/* \ 91 | /build \ 92 | /root/packages 93 | 94 | ############################################################################## 95 | # Here starts the usual changes compared to baseimage. 96 | 97 | ENV S6_BEHAVIOUR_IF_STAGE2_FAILS="2" 98 | 99 | # Set python to use utf-8 rather than ascii. 100 | # Also, for python3: https://bugs.python.org/issue19846 101 | ENV LANG C.UTF-8 102 | 103 | # Copy local files. 104 | COPY etc/ /etc 105 | RUN chmod -v +x \ 106 | /etc/cont-init.d/* \ 107 | /etc/services.d/*/run 108 | COPY requirements.txt / 109 | 110 | # Ports and volumes. 111 | EXPOSE 5050/tcp 112 | VOLUME /config 113 | 114 | # Flexget looks for config.yml automatically inside: 115 | # /root/.flexget, /root/.config/flexget 116 | # Since the uid/gid for user abc can be changed on the fly, set 777. 117 | RUN CONFIG_SYMLINK_DIR=/root \ 118 | && ln -s /config "$CONFIG_SYMLINK_DIR/.flexget" \ 119 | && chmod 777 "$CONFIG_SYMLINK_DIR/" \ 120 | && chmod 777 "$CONFIG_SYMLINK_DIR/.flexget/" 121 | -------------------------------------------------------------------------------- /Dockerfile.aarch64: -------------------------------------------------------------------------------- 1 | ############################################################################## 2 | # Source: https://github.com/linuxserver/docker-baseimage-alpine-python3/blob/master/Dockerfile 3 | # Simply using it as a baseimage fails: 4 | # - installing g++ fails (baseimage already installs it and purges it afterwards, so let's keep it) 5 | # - installing python 3.7.3 because that is what py3-libtorrent-rasterbar requires (doesn't work with 3.6.8) 6 | FROM lsiobase/alpine:arm64v8-3.10 7 | 8 | RUN apk add \ 9 | libxml2-dev \ 10 | libxslt-dev \ 11 | python3 \ 12 | python3-dev \ 13 | py3-lxml \ 14 | boost-python3 \ 15 | bash && \ 16 | echo "**** install alpine sdk so that we can build libtorrent python bindings (for various plugin) ****" && \ 17 | apk add alpine-sdk && \ 18 | abuild-keygen -ian && \ 19 | usermod -aG abuild root 20 | 21 | RUN \ 22 | echo "**** install build packages ****" && \ 23 | apk add --no-cache \ 24 | autoconf \ 25 | automake \ 26 | freetype-dev \ 27 | g++ \ 28 | gcc \ 29 | jpeg-dev \ 30 | lcms2-dev \ 31 | libffi-dev \ 32 | libpng-dev \ 33 | libwebp-dev \ 34 | linux-headers \ 35 | make \ 36 | openjpeg-dev \ 37 | openssl-dev \ 38 | tiff-dev \ 39 | zlib-dev && \ 40 | echo "**** install runtime packages ****" && \ 41 | apk add --no-cache \ 42 | curl \ 43 | freetype \ 44 | git \ 45 | lcms2 \ 46 | libjpeg-turbo \ 47 | libwebp \ 48 | openjpeg \ 49 | openssl \ 50 | p7zip \ 51 | tar \ 52 | tiff \ 53 | unrar \ 54 | unzip \ 55 | vnstat \ 56 | wget \ 57 | xz \ 58 | zlib && \ 59 | echo "**** use ensure to check for pip and link /usr/bin/pip3 to /usr/bin/pip ****" && \ 60 | python3 -m ensurepip && \ 61 | rm -r /usr/lib/python*/ensurepip && \ 62 | if \ 63 | [ ! -e /usr/bin/pip ]; then \ 64 | ln -s /usr/bin/pip3 /usr/bin/pip ; fi && \ 65 | echo "**** install pip packages ****" && \ 66 | pip install --no-cache-dir -U \ 67 | pip \ 68 | setuptools && \ 69 | pip install -U \ 70 | configparser \ 71 | ndg-httpsclient \ 72 | notify \ 73 | paramiko \ 74 | pillow \ 75 | psutil \ 76 | pyopenssl \ 77 | requests \ 78 | setuptools \ 79 | urllib3 \ 80 | virtualenv && \ 81 | echo "**** build libtorrent-rasterbar, this takes a bit ****" && \ 82 | mkdir -p /build/py3-libtorrent-rasterbar && \ 83 | cd /build/py3-libtorrent-rasterbar && \ 84 | wget https://git.alpinelinux.org/aports/plain/testing/libtorrent-rasterbar/APKBUILD && \ 85 | abuild -F checksum && abuild -Fr && \ 86 | apk add --repository /root/packages/build py3-libtorrent-rasterbar && \ 87 | echo "**** clean up ****" && \ 88 | rm -rf \ 89 | /root/.cache \ 90 | /tmp/* \ 91 | /build \ 92 | /root/packages 93 | 94 | ############################################################################## 95 | # Here starts the usual changes compared to baseimage. 96 | 97 | ENV S6_BEHAVIOUR_IF_STAGE2_FAILS="2" 98 | 99 | # Set python to use utf-8 rather than ascii. 100 | # Also, for python3: https://bugs.python.org/issue19846 101 | ENV LANG C.UTF-8 102 | 103 | # Copy local files. 104 | COPY etc/ /etc 105 | RUN chmod -v +x \ 106 | /etc/cont-init.d/* \ 107 | /etc/services.d/*/run 108 | COPY requirements.txt / 109 | 110 | # Ports and volumes. 111 | EXPOSE 5050/tcp 112 | VOLUME /config 113 | 114 | # Flexget looks for config.yml automatically inside: 115 | # /root/.flexget, /root/.config/flexget 116 | # Since the uid/gid for user abc can be changed on the fly, set 777. 117 | RUN CONFIG_SYMLINK_DIR=/root \ 118 | && ln -s /config "$CONFIG_SYMLINK_DIR/.flexget" \ 119 | && chmod 777 "$CONFIG_SYMLINK_DIR/" \ 120 | && chmod 777 "$CONFIG_SYMLINK_DIR/.flexget/" 121 | -------------------------------------------------------------------------------- /Dockerfile.armhf: -------------------------------------------------------------------------------- 1 | ############################################################################## 2 | # Source: https://github.com/linuxserver/docker-baseimage-alpine-python3/blob/master/Dockerfile 3 | # Simply using it as a baseimage fails: 4 | # - installing g++ fails (baseimage already installs it and purges it afterwards, so let's keep it) 5 | # - installing python 3.7.3 because that is what py3-libtorrent-rasterbar requires (doesn't work with 3.6.8) 6 | FROM lsiobase/alpine:arm32v7-3.10 7 | 8 | RUN apk add \ 9 | libxml2-dev \ 10 | libxslt-dev \ 11 | python3 \ 12 | python3-dev \ 13 | py3-lxml \ 14 | boost-python3 \ 15 | bash && \ 16 | echo "**** install alpine sdk so that we can build libtorrent python bindings (for various plugin) ****" && \ 17 | apk add alpine-sdk && \ 18 | abuild-keygen -ian && \ 19 | usermod -aG abuild root 20 | 21 | RUN \ 22 | echo "**** install build packages ****" && \ 23 | apk add --no-cache \ 24 | autoconf \ 25 | automake \ 26 | freetype-dev \ 27 | g++ \ 28 | gcc \ 29 | jpeg-dev \ 30 | lcms2-dev \ 31 | libffi-dev \ 32 | libpng-dev \ 33 | libwebp-dev \ 34 | linux-headers \ 35 | make \ 36 | openjpeg-dev \ 37 | openssl-dev \ 38 | tiff-dev \ 39 | zlib-dev && \ 40 | echo "**** install runtime packages ****" && \ 41 | apk add --no-cache \ 42 | curl \ 43 | freetype \ 44 | git \ 45 | lcms2 \ 46 | libjpeg-turbo \ 47 | libwebp \ 48 | openjpeg \ 49 | openssl \ 50 | p7zip \ 51 | tar \ 52 | tiff \ 53 | unrar \ 54 | unzip \ 55 | vnstat \ 56 | wget \ 57 | xz \ 58 | zlib && \ 59 | echo "**** use ensure to check for pip and link /usr/bin/pip3 to /usr/bin/pip ****" && \ 60 | python3 -m ensurepip && \ 61 | rm -r /usr/lib/python*/ensurepip && \ 62 | if \ 63 | [ ! -e /usr/bin/pip ]; then \ 64 | ln -s /usr/bin/pip3 /usr/bin/pip ; fi && \ 65 | echo "**** install pip packages ****" && \ 66 | pip install --no-cache-dir -U \ 67 | pip \ 68 | setuptools && \ 69 | pip install -U \ 70 | configparser \ 71 | ndg-httpsclient \ 72 | notify \ 73 | paramiko \ 74 | pillow \ 75 | psutil \ 76 | pyopenssl \ 77 | requests \ 78 | setuptools \ 79 | urllib3 \ 80 | virtualenv && \ 81 | echo "**** build libtorrent-rasterbar, this takes a bit ****" && \ 82 | mkdir -p /build/py3-libtorrent-rasterbar && \ 83 | cd /build/py3-libtorrent-rasterbar && \ 84 | wget https://git.alpinelinux.org/aports/plain/testing/libtorrent-rasterbar/APKBUILD && \ 85 | abuild -F checksum && abuild -Fr && \ 86 | apk add --repository /root/packages/build py3-libtorrent-rasterbar && \ 87 | echo "**** clean up ****" && \ 88 | rm -rf \ 89 | /root/.cache \ 90 | /tmp/* \ 91 | /build \ 92 | /root/packages 93 | 94 | ############################################################################## 95 | # Here starts the usual changes compared to baseimage. 96 | 97 | ENV S6_BEHAVIOUR_IF_STAGE2_FAILS="2" 98 | 99 | # Set python to use utf-8 rather than ascii. 100 | # Also, for python3: https://bugs.python.org/issue19846 101 | ENV LANG C.UTF-8 102 | 103 | # Copy local files. 104 | COPY etc/ /etc 105 | RUN chmod -v +x \ 106 | /etc/cont-init.d/* \ 107 | /etc/services.d/*/run 108 | COPY requirements.txt / 109 | 110 | # Ports and volumes. 111 | EXPOSE 5050/tcp 112 | VOLUME /config 113 | 114 | # Flexget looks for config.yml automatically inside: 115 | # /root/.flexget, /root/.config/flexget 116 | # Since the uid/gid for user abc can be changed on the fly, set 777. 117 | RUN CONFIG_SYMLINK_DIR=/root \ 118 | && ln -s /config "$CONFIG_SYMLINK_DIR/.flexget" \ 119 | && chmod 777 "$CONFIG_SYMLINK_DIR/" \ 120 | && chmod 777 "$CONFIG_SYMLINK_DIR/.flexget/" 121 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cpoppema/docker-flexget 2 | 3 | [![Build Status](https://img.shields.io/docker/build/cpoppema/docker-flexget.svg)](https://hub.docker.com/r/cpoppema/docker-flexget/builds) 4 | [![Image Size](https://img.shields.io/microbadger/image-size/cpoppema/docker-flexget.svg?style=flat&color=blue)](https://hub.docker.com/r/cpoppema/docker-flexget) 5 | [![Docker Stars](https://img.shields.io/docker/stars/cpoppema/docker-flexget.svg?style=flat&color=blue)](https://registry.hub.docker.com/v2/repositories/cpoppema/docker-flexget/stars/count/) 6 | [![Docker Pulls](https://img.shields.io/docker/pulls/cpoppema/docker-flexget.svg?style=flat&color=blue)](https://registry.hub.docker.com/v2/repositories/cpoppema/docker-flexget/) 7 | [![Docker Automated build](https://img.shields.io/docker/automated/cpoppema/docker-flexget.svg?maxAge=2592000&style=flat&color=blue)](https://github.com/cpoppema/docker-flexget/) 8 | [![Buy Me A Coffee](https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg)](https://www.buymeacoffee.com/cpoppema) 9 | 10 | Read all about FlexGet [here](http://www.flexget.com/#Description). 11 | 12 | If you do not have a configuration already, you can look around starting off with something like this [config.yml](https://github.com/cpoppema/docker-flexget/blob/master/sample_config.yml): 13 | ``` 14 | web_server: yes 15 | 16 | schedules: 17 | - tasks: '*' 18 | interval: 19 | minutes: 1 20 | 21 | tasks: 22 | test task: 23 | rss: http://myfavoritersssite.com/myfeed.rss 24 | series: 25 | - My Favorite Show 26 | ``` 27 | Put this file in your data/config folder as `config.yml`. 28 | 29 | For a much better FlexGet config.yml example take a look at the bottom of [this page](http://flexget.com/Cookbook/Series/SeriesPresetMultipleRSStoTransmission). 30 | 31 | ## Note 32 | 33 | Recently the python version inside this image had to be upgraded from 2.x to 3.x, this might result in this error message: 34 | 35 | ``` 36 | INFO scheduler Starting scheduler 37 | INFO apscheduler.scheduler Scheduler started 38 | ERROR apscheduler.jobstores.default Unable to restore job "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -- removing it 39 | Traceback (most recent call last): 40 | File "/usr/lib/python3.7/site-packages/apscheduler/jobstores/sqlalchemy.py", line 141, in _get_jobs 41 | jobs.append(self._reconstitute_job(row.job_state)) 42 | File "/usr/lib/python3.7/site-packages/apscheduler/jobstores/sqlalchemy.py", line 125, in _reconstitute_job 43 | job_state = pickle.loads(job_state) 44 | UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 1: ordinal not in range(128) 45 | ``` 46 | 47 | This is supposedly safe to ignore and should only happens once. If not, let me [know](https://github.com/cpoppema/docker-flexget/issues). 48 | 49 | ## Usage 50 | 51 | ### docker 52 | 53 | ``` 54 | docker create \ 55 | --name=flexget \ 56 | -e PUID= \ 57 | -e PGID= \ 58 | -e WEB_PASSWD=yourhorriblesecret \ 59 | -e TORRENT_PLUGIN=transmission \ 60 | -e TZ=Europe/London \ 61 | -e FLEXGET_LOG_LEVEL=debug \ 62 | -p 5050:5050 \ 63 | -v :/config \ 64 | -v :/downloads \ 65 | cpoppema/docker-flexget 66 | ``` 67 | 68 | ### docker-compose 69 | 70 | ``` 71 | --- 72 | version: "2" 73 | services: 74 | flexget: 75 | image: cpoppema/docker-flexget 76 | container_name: flexget 77 | environment: 78 | - PUID= 79 | - PGID= 80 | - WEB_PASSWD=yourhorriblesecret 81 | - TORRENT_PLUGIN=transmission 82 | - TZ=Europe/London 83 | - FLEXGET_LOG_LEVEL=debug 84 | volumes: 85 | - :/config 86 | - :/downloads 87 | ports: 88 | - 5050:5050 89 | restart: unless-stopped 90 | ``` 91 | 92 | For shell access whilst the container is running do `docker exec -it flexget /bin/bash`. 93 | 94 | **Parameters** 95 | 96 | * `-e PUID` for UserID - see below for explanation 97 | * `-e PGID` for GroupID - see below for explanation 98 | * `-e WEB_PASSWD` for the Web UI password - see below for explanation 99 | * `-e TORRENT_PLUGIN` for the torrent plugin you need, e.g. "transmission" or "deluge" 100 | * `-e TZ` for timezone information, e.g. "Europe/London" 101 | * `-e FLEXGET_LOG_LEVEL` for logging level - see below for explanation 102 | * `-e PIP_REQUIREMENTS_FILE` to either add neccessary packages for plugins _or_ to pin e.g. FlexGet to a certain version until you have time to migrate your configuration because they might be incompatible. 103 | * `-p 5050` for Web UI port - see below for explanation 104 | * `-v /config` - Location of FlexGet config.yml (DB files will be created on startup and also live in this directory) 105 | * `-v /downloads` - location of downloads on disk 106 | 107 | **Torrent plugin: Transmission** 108 | 109 | FlexGet is able to connect with transmission using `transmission-rpc`, which is installed as the default torrent plugin in this container. For more details, see http://flexget.com/wiki/Plugins/transmission. 110 | 111 | Please note: This Docker image does NOT run Transmission. Consider running a [Transmission Docker image](https://github.com/linuxserver/docker-transmission/) alongside this one. 112 | 113 | For transmission to work you can either omit the `TORRENT_PLUGIN` environment variable or set it to "transmission". 114 | 115 | **Torrent plugin: Deluge** 116 | 117 | FlexGet is also able to connect with deluge using `deluge-client`, which can be installed in this container, replacing the transmission plugin. For more details, see https://www.flexget.com/Plugins/deluge. 118 | 119 | Please note: This Docker image does NOT run Deluge. Consider running a [Deluge Docker image](https://hub.docker.com/r/linuxserver/deluge/) alongside this one. 120 | 121 | For deluge to work you need to set `TORRENT_PLUGIN` environment variable to "deluge". 122 | 123 | **Daemon mode** 124 | 125 | This container runs flexget in [daemon mode](https://flexget.com/Daemon). This means by default it will run your configured tasks every hour after you've started it for the first time. If you want to run your tasks on the hour or at a different time, look at the [scheduler](https://flexget.com/Plugins/Daemon/scheduler) plugin for configuration options. Configuration is automatically reloaded every time just before starting the tasks as scheduled, to apply your changes immediately you will need to restart the container. 126 | 127 | **Web UI** 128 | 129 | FlexGet is able to host a Web UI if you have this enabled in your configuration file. See [the wiki](https://flexget.com/wiki/Web-UI) for all details. To get started, simply add: 130 | 131 | ``` 132 | web_server: yes 133 | ``` 134 | 135 | The Web UI is protected by a login, you need to either set the `WEB_PASSWD` environment variable or setup a user after starting this docker: 136 | 137 | Connect with the running docker: 138 | 139 | ``` 140 | docker exec -it flexget bash 141 | ``` 142 | 143 | If your configuration file is named "config.yml" you can setup a password like this: 144 | 145 | ``` 146 | flexget -c /config/config.yml web passwd 147 | ``` 148 | 149 | Now you can open the Web UI at `http://:5050` and login with this password, use `flexget` as your username. 150 | 151 | Note: if you ever change your password in a running container, don't worry. Recreating or restarting your container will not simply overwrite your new password. If you want to reset your password to the value in `WEB_PASSWD` you can simply remove the `.password-lock` file in your config folder. 152 | 153 | **Logging Level** 154 | 155 | Set the verbosity of the logger. Optional, defaults to debug if not set. Levels: critical, error, warning, info, verbose, debug, trace. 156 | 157 | **Installing additional packages** 158 | 159 | 160 | Using `-e PIP_REQUIREMENTS_FILE` you can install extra plugin packages you need that are not (yet) baked into this image. If you want to this image to support your plugin out of the box, open an issue to request it or create pull request to add it! Until that's done, here's how you can add packages. 161 | 162 | Specifying `-e PIP_REQUIREMENTS_FILE` will install packages *besides* the provided [requirements.txt](https://github.com/cpoppema/docker-flexget/blob/master/requirements.txt). 163 | 164 | To get started, create a file `my-requirements.txt` inside your /config directory. Let's say you need `sleekxmpp` for the xmpp notifier system and it is missing from this image. You tell the image where to find it like this: 165 | 166 | ``` 167 | docker create \ 168 | --name=flexget \ 169 | -e PIP_REQUIREMENTS_FILE=/config/my-requirements.txt \ 170 | -v :/config \ 171 | -v :/downloads \ 172 | cpoppema/docker-flexget 173 | ``` 174 | 175 | If you don't like adding files to your /config directory, you can put it anywhere with an extra -v flag: 176 | 177 | ``` 178 | docker create \ 179 | --name=flexget \ 180 | -e PIP_REQUIREMENTS_FILE=/my-requirements.txt \ 181 | -v :/config \ 182 | -v :/downloads \ 183 | -v :/my-requirements.txt \ 184 | cpoppema/docker-flexget 185 | ``` 186 | 187 | **Pinning packages or FlexGet** 188 | 189 | To pin packages that are automatically installed you use -v to overwrite `/requirements.txt`: 190 | 191 | ``` 192 | docker create \ 193 | --name=flexget \ 194 | -v :/config \ 195 | -v :/downloads \ 196 | -v :/requirements.txt \ 197 | cpoppema/docker-flexget 198 | ``` 199 | 200 | If you want to pin packages that are not automatically installed, you can follow the instructions above and [put the versions](https://pip.pypa.io/en/stable/user_guide/#pinned-version-numbers) you want in `my-requirements.txt`. 201 | 202 | ### User / Group Identifiers 203 | 204 | **TL;DR** - The `PGID` and `PUID` values set the user / group you'd like your container to 'run as' to the host OS. This can be a user you've created or even root (not recommended). 205 | 206 | Part of what makes this container work so well is by allowing you to specify your own `PUID` and `PGID`. This avoids nasty permissions errors with relation to data volumes (`-v` flags). When an application is installed on the host OS it is normally added to the common group called users, Docker apps due to the nature of the technology can't be added to this group. So this feature was added to let you easily choose when running your containers. 207 | 208 | [Flexget CLI](https://flexget.com/CLI) 209 | 210 | ## Updates / Monitoring 211 | 212 | * Upgrade to the latest version of FlexGet simply `docker restart flexget`. 213 | * Monitor the logs of the container in realtime `docker logs -f flexget`. 214 | 215 | **Credits** 216 | * [linuxserver.io](https://github.com/linuxserver) for providing awesome docker containers. 217 | -------------------------------------------------------------------------------- /etc/cont-init.d/20-update-flexget: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | pip install -U pip 4 | 5 | # Preferably deps are installed using `pip install -r requirements.txt`. This 6 | # however results in packages complaining about version mismatches. Here are 7 | # some sample errors to keep in mind if we'd like to step away from 8 | # pip install runs per package. 9 | 10 | # ERROR: flexget 3.0.8 has requirement beautifulsoup4==4.6.0, but you'll have beautifulsoup4 4.8.1 which is incompatible. 11 | # ERROR: flexget 3.0.8 has requirement certifi==2017.4.17, but you'll have certifi 2019.9.11 which is incompatible. 12 | # ERROR: flexget 3.0.8 has requirement chardet==3.0.3, but you'll have chardet 3.0.4 which is incompatible. 13 | # ERROR: flexget 3.0.8 has requirement click==6.7, but you'll have click 7.0 which is incompatible. 14 | # ERROR: flexget 3.0.8 has requirement pytz==2017.2, but you'll have pytz 2019.3 which is incompatible. 15 | # ERROR: flexget 3.0.8 has requirement requests==2.21.0, but you'll have requests 2.22.0 which is incompatible. 16 | # ERROR: flexget 3.0.8 has requirement urllib3==1.24.2, but you'll have urllib3 1.25.7 which is incompatible. 17 | 18 | # ERROR: guessit 3.1.0 has requirement rebulk==2.*, but you'll have rebulk 0.9.0 which is incompatible. 19 | # ERROR: flexget 2.21.35 has requirement beautifulsoup4==4.6.0, but you'll have beautifulsoup4 4.8.1 which is incompatible. 20 | # ERROR: flexget 2.21.35 has requirement certifi==2017.4.17, but you'll have certifi 2019.9.11 which is incompatible. 21 | # ERROR: flexget 2.21.35 has requirement chardet==3.0.3, but you'll have chardet 3.0.4 which is incompatible. 22 | # ERROR: flexget 2.21.35 has requirement click==6.7, but you'll have click 7.0 which is incompatible. 23 | # ERROR: flexget 2.21.35 has requirement future==0.16.0, but you'll have future 0.18.2 which is incompatible. 24 | # ERROR: flexget 2.21.35 has requirement guessit==3.0.3, but you'll have guessit 3.1.0 which is incompatible. 25 | # ERROR: flexget 2.21.35 has requirement pytz==2017.2, but you'll have pytz 2019.3 which is incompatible. 26 | # ERROR: flexget 2.21.35 has requirement requests==2.21.0, but you'll have requests 2.22.0 which is incompatible. 27 | # ERROR: flexget 2.21.35 has requirement six==1.10.0, but you'll have six 1.13.0 which is incompatible. 28 | # ERROR: flexget 2.21.35 has requirement urllib3==1.24.2, but you'll have urllib3 1.25.6 which is incompatible. 29 | 30 | # Traceback (most recent call last): 31 | # File "/usr/lib/python3.7/site-packages/stevedore/extension.py", line 195, in _load_plugins 32 | # verify_requirements, 33 | # File "/usr/lib/python3.7/site-packages/stevedore/extension.py", line 223, in _load_one_plugin 34 | # plugin = ep.resolve() 35 | # File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2449, in resolve 36 | # module = __import__(self.module_name, fromlist=['__name__'], level=0) 37 | # File "/usr/lib/python3.7/site-packages/subliminal/providers/thesubdb.py", line 38, in 38 | # class TheSubDBProvider(Provider): 39 | # File "/usr/lib/python3.7/site-packages/subliminal/providers/thesubdb.py", line 40, in TheSubDBProvider 40 | # languages = {Language.fromthesubdb(l) for l in language_converters['thesubdb'].codes} 41 | # File "/usr/lib/python3.7/site-packages/babelfish/converters/__init__.py", line 240, in __getitem__ 42 | # self.converters[ep.name] = ep.load()() 43 | # File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2442, in load 44 | # self.require(*args, **kwargs) 45 | # File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2465, in require 46 | # items = working_set.resolve(reqs, env, installer, extras=self.extras) 47 | # File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 791, in resolve 48 | # raise VersionConflict(dist, req).with_context(dependent_req) 49 | # pkg_resources.ContextualVersionConflict: (rebulk 0.9.0 (/usr/lib/python3.7/site-packages), Requirement.parse('rebulk==2.*'), {'guessit'}) 50 | 51 | # Meaning: we're doing it the old fashioned way: pip install -U every line. 52 | 53 | if [ ! -z "$PIP_REQUIREMENTS_FILE" ]; then 54 | while IFS= read -r line; do 55 | if [ ! -z "$line" ] && [[ "$line" != \#* ]]; then 56 | pip install -U "$line" 57 | fi 58 | done < "$PIP_REQUIREMENTS_FILE" 59 | fi 60 | 61 | while IFS= read -r line; do 62 | if [ ! -z "$line" ] && [[ "$line" != \#* ]]; then 63 | pip install -U "$line" 64 | fi 65 | done < /requirements.txt 66 | -------------------------------------------------------------------------------- /etc/cont-init.d/21-update-transmission: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | if [ -z "$TORRENT_PLUGIN" ] || [[ "$TORRENT_PLUGIN" == *"transmission"* ]]; then 4 | pip install -U transmission-rpc 5 | fi 6 | -------------------------------------------------------------------------------- /etc/cont-init.d/22-update-deluge: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | if [[ "$TORRENT_PLUGIN" == *"deluge"* ]]; then 4 | pip install -U deluge_client 5 | fi 6 | -------------------------------------------------------------------------------- /etc/cont-init.d/30-set-web-passwd: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | # Set the password if there is no lock file. This lock file is created when 4 | # setting the password. 5 | # 6 | # This lock file prevents an accidental reset of the password, in case this 7 | # container is recreated or restarted, after manually changing the password. 8 | # 9 | 10 | if [ ! -z "$WEB_PASSWD" ]; then 11 | if [ ! -f /config/.password-lock ]; then 12 | output=$(s6-setuidgid abc /usr/bin/flexget -c /config/config.yml --loglevel "${FLEXGET_LOG_LEVEL:-debug}" web passwd "$WEB_PASSWD") 13 | if [[ "$output" == *"not strong enough"* ]]; then 14 | echo "Failed to set password, FlexGet deems your password as not strong enough. Update WEB_PASSWD and try again." 15 | exit 1 16 | else 17 | s6-setuidgid abc touch /config/.password-lock 18 | fi 19 | else 20 | echo "Not overwriting password: file /config/.password-lock exists." 21 | fi 22 | fi 23 | -------------------------------------------------------------------------------- /etc/services.d/flexget/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | # `flexget daemon` runs all tasks in the config every hour by default, for more 4 | # options see https://flexget.com/Plugins/Daemon/scheduler. 5 | # 6 | # `--autoreload-config` reloads the config *before* running the tasks, not 7 | # when the configuration actually changes. 8 | # 9 | 10 | if [ -f /config/.config-lock ]; then 11 | rm /config/.config-lock 12 | fi 13 | 14 | s6-setuidgid abc /usr/bin/flexget \ 15 | --loglevel "${FLEXGET_LOG_LEVEL:-debug}" \ 16 | daemon start --autoreload-config 17 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | urllib3[socks] 2 | 3 | # Plugins. 4 | chardet 5 | cloudscraper 6 | irc_bot 7 | python-telegram-bot<13 8 | rarfile 9 | sleekxmpp 10 | subliminal 11 | 12 | # Install flexget last (it might force specific versions of other packages). 13 | flexget 14 | -------------------------------------------------------------------------------- /sample_config.yml: -------------------------------------------------------------------------------- 1 | web_server: yes 2 | 3 | schedules: 4 | - tasks: '*' 5 | interval: 6 | minutes: 1 7 | 8 | tasks: 9 | test task: 10 | rss: http://myfavoritersssite.com/myfeed.rss 11 | series: 12 | - My Favorite Show 13 | --------------------------------------------------------------------------------