Coder Social home page Coder Social logo

docker_mediaservices's Introduction

docker_mediaservices

License

This is now archived and no longer actively being maintained

Docker container with OpenVPN, SABnzbd and Transmission Daemon

Stolen from https://github.com/haugene/docker-transmission-openvpn. Thank you haugene for making a great container.

How this is different

Build on Ubuntu 18.04 with SABnzbd. Removed Transmission RSS, Tinyproxy Webproxy, and the WebUIs (may add them back). Created a simple script that creates a self-signed certificate for SSL use.

Run container from Docker registry

The container is available from the Docker registry and this is the simplest way to get it. To run the container use this command:

$ docker run --cap-add=NET_ADMIN --device=/dev/net/tun -d \
-v /your/storage/path:/data \
-v /etc/localtime:/etc/localtime:ro \
--env-file /dockerenvironmentfile/path/DockerEnv \
-p 7000:7000 -p 9091:9091 \
--dns 1.1.1.1 --dns 1.0.0.1 \
jsloan117/mediaservices
$ docker run --cap-add=NET_ADMIN --device=/dev/net/tun -d \
-v /your/storage/path:/data \
-v /etc/localtime:/etc/localtime:ro \
-e OPENVPN_PROVIDER=PIA \
-e OPENVPN_CONFIG=CA\ Toronto \
-e OPENVPN_USERNAME=user \
-e OPENVPN_PASSWORD=pass \
-e LOCAL_NETWORK=192.168.1.0/24 \
-p 7000:7000 -p 9091:9091 \
--dns 1.1.1.1 --dns 1.0.0.1 \
jsloan117/mediaservices

Supported providers

This is a list of providers that are bundled within the image. The custom provider setting can be used with any provider.

Provider Name Config Value (OPENVPN_PROVIDER)
Anonine ANONINE
AnonVPN ANONVPN
BlackVPN BLACKVPN
BTGuard BTGUARD
Cryptostorm CRYPTOSTORM
Cypherpunk CYPHERPUNK
FreeVPN FREEVPN
FrootVPN FROOT
FrostVPN FROSTVPN
GhostPath GHOSTPATH
Giganews GIGANEWS
HideMe HIDEME
HideMyAss HIDEMYASS
IntegrityVPN INTEGRITYVPN
IPredator IPREDATOR
IPVanish IPVANISH
IronSocket IRONSOCKET
Ivacy IVACY
IVPN IVPN
Mullvad MULLVAD
Newshosting NEWSHOSTING
NordVPN NORDVPN
OVPN OVPN
Perfect Privacy PERFECTPRIVACY
Private Internet Access PIA
PrivateVPN PRIVATEVPN
ProtonVPN PROTONVPN
proXPN PROXPN
proxy.sh PROXYSH
PureVPN PUREVPN
RA4W VPN RA4W
SaferVPN SAFERVPN
SlickVPN SLICKVPN
Smart DNS Proxy SMARTDNSPROXY
SmartVPN SMARTVPN
Surfshark SURFSHARK
TigerVPN TIGER
TorGuard TORGUARD
Trust.Zone TRUSTZONE
TunnelBear TUNNELBEAR
UsenetServerVPN USENETSERVER
Windscribe WINDSCRIBE
VPNArea.com VPNAREA
VPN.AC VPNAC
VPN.ht VPNHT
VPNBook.com VPNBOOK
VPNFacile VPNFACILE
VPNTunnel VPNTUNNEL
VyprVpn VYPRVPN

Required environment options

Variable Function Example
OPENVPN_PROVIDER Sets the OpenVPN provider to use. OPENVPN_PROVIDER=provider
OPENVPN_USERNAME Your OpenVPN username OPENVPN_USERNAME=asdf
OPENVPN_PASSWORD Your OpenVPN password OPENVPN_PASSWORD=asdf

Network configuration options

Variable Function Example
OPENVPN_CONFIG Sets the OpenVPN endpoint to connect to. OPENVPN_CONFIG=UK Southampton
OPENVPN_OPTS Will be passed to OpenVPN on startup See OpenVPN doc
LOCAL_NETWORK Sets the local network that should have access. Accepts comma separated list. LOCAL_NETWORK=192.168.0.0/24

User configuration options

By default everything will run as the root user. However, it is possible to change who runs the transmission process. You may set the following parameters to customize the user id that runs transmission.

Variable Function Example
PUID Sets the user id who will run transmission PUID=1000
PGID Sets the group id for the transmission user PGID=1000

SABnzbd environment options

Variable Function Example
SABNZBD_HOME SABnzbd config files SABNZBD_HOME=/data/sabnzbd-home
SABNZBD_BIND_ADDRESS IP Address SABnzbd listens on SABNZBD_BIND_ADDRESS=0.0.0.0
SABNZBD_PORT Port SABnzbd listens on SABNZBD_PORT=7000
SABNZBD_OPTS SABnzbd startup options SABNZBD_OPTS='-d -b 0'

Health check option

Because your VPN connection can sometimes fail, Docker will run a health check on this container every 5 minutes to see if the container is still connected to the internet. By default, this check is done by pinging google.com once. You change the host that is pinged.

Variable Function Example
HEALTH_CHECK_HOST this host is pinged to check if the network connection still works google.com

Custom pre/post scripts

If you ever need to run custom code before or after transmission is executed or stopped, you can use the custom scripts feature. Custom scripts are located in the /scripts directory which is empty by default. To enable this feature, you'll need to mount the /scripts directory.

Once /scripts is mounted you'll need to write your custom code in the following bash shell scripts:

Script Function
/scripts/openvpn-pre-start.sh This shell script will be executed before openvpn start
/scripts/transmission-pre-start.sh This shell script will be executed before transmission start
/scripts/transmission-post-start.sh This shell script will be executed after transmission start
/scripts/transmission-pre-stop.sh This shell script will be executed before transmission stop
/scripts/transmission-post-stop.sh This shell script will be executed after transmission stop

create_cert.sh SSL options

This script can be manually ran to generate the certificate or automatically.

/etc/transmission/create_cert.sh
Variable Function Defaults
GENCERT Generates SSL Cert with below options GENCERT=no
Variable Defaults
Country Country=US
State State=Reach
Locality Locality=Sector9
Company Company=MediaServices
Department Department=Mediaservices
HostName HostName=MediaBox.local

docker_mediaservices's People

Contributors

fossabot avatar jsloan117 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

fossabot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.