Skip to content

A combined docker image for the unified deployment of itsToggle's, yowmamasita's, and ncw's projects -- plex_debrid, zurg, and rclone

License

Notifications You must be signed in to change notification settings

tourshi/pd_zurg

Repository files navigation

pd_zurg

Description

A combined docker image for the unified deployment of itsToggle's, yowmamasita's, and ncw's projects -- plex_debrid, zurg, and rclone

Features

Docker Hub

A prebuilt image is hosted on docker hub

Docker-compose

version: "3.8"

services:
  pd_zurg:
    container_name: pd_zurg
    image: iampuid0/pd_zurg:latest
    stdin_open: true # docker run -i
    tty: true        # docker run -t    
    volumes:
      # Location of configuration files. If a Zurg config.yml and/or Zurg app is placed here, it will be used to override the default configuration and/or app used at startup 
      - /pd_zurg/config:/config
      # Location for logs
      - /pd_zurg/log:/log
      # Location for rclone cache if enabled
      - /pd_zurg/cache:/cache
      # Location for Zurg RealDebrid active configuration
      - /pd_zurg/RD:/zurg/RD
      # Location for Zurg AllDebrid active configuration -- when supported by Zurg     
      - /pd_zurg/AD:/zurg/AD   
      # Location for rclone mount to host
      - /pd_zurg/mnt:/data:shared       
    environment:
      - TZ=
      # Zurg Required Settings
      - ZURG_ENABLED=true      
      - RD_API_KEY=
      # Rclone Required Settings
      - RCLONE_MOUNT_NAME=pd_zurg
      # Rclone Optional Settings - See rclone docs for full list
      - RCLONE_LOG_LEVEL=INFO
      - RCLONE_CACHE_DIR=/cache
      - RCLONE_DIR_CACHE_TIME=10s
      - RCLONE_VFS_CACHE_MODE=full
      - RCLONE_VFS_CACHE_MAX_SIZE=100G
      - RCLONE_ATTR_TIMEOUT=8700h
      - RCLONE_BUFFER_SIZE=32M
      - RCLONE_VFS_CACHE_MAX_AGE=4h
      - RCLONE_VFS_READ_CHUNK_SIZE=32M
      - RCLONE_VFS_READ_CHUNK_SIZE_LIMIT=1G
      - RCLONE_TRANSFERS=8
      # Plex Debrid Required Settings
      - PLEX_USER=
      - PLEX_TOKEN=
      - PLEX_ADDRESS=
      # Plex Debrid Optional Settings
      - AUTO_UPDATE=true
      - AUTO_UPDATE_INTERVAL=12
      - SHOW_MENU=true
      # Special Features
      - DUPLICATE_CLEANUP=true
      - CLEANUP_INTERVAL=1
      - PDZURG_LOG_LEVEL=INFO
      - PDZURG_LOG_COUNT=2
    # attach to gluetun vpn container if realdebrid blocks IP address 
    network_mode: container:gluetun  
    devices:
      - /dev/fuse:/dev/fuse:rwm
    cap_add:
      - SYS_ADMIN     
    security_opt:
      - apparmor:unconfined    
      - no-new-privileges

Docker Build

Docker CLI

docker build -t yourimagename https://github.com/I-am-PUID-0/pd_zurg.git

Automatic Updates

If you would like to enable automatic updates for plex_debrid, utilize the AUTO_UPDATE environment variable. Additional details can be found in the pd_zurg Wiki

If you would like to enable automatic updates for Zurg, utilize the ZURG_UPDATE environment variable. Additional details can be found in the pd_zurg Wiki

Environment Variables

To customize some properties of the container, the following environment variables can be passed via the -e parameter (one for each variable), or via the docker-compose file within the environment: section, or with a .env file saved to the config directory -- See the wiki for more info on using the .env. Value of this parameter has the format <VARIABLE_NAME>=<VALUE>.

| Variable | Description | Default | Required for rclone| Required for plex_debrid| Required for zurg| |----------------|----------------------------------------------|---------|:-:|:-:| |TZ| TimeZone used by the container | | |RD_API_KEY| RealDebrid API key | | | ✔️| ✔️| |AD_API_KEY| AllDebrid API key | | | ✔️| ✔️| |RCLONE_MOUNT_NAME| A name for the rclone mount | | ✔️| |RCLONE_LOG_LEVEL| Log level for rclone | NOTICE | |RCLONE_LOG_FILE| Log file for rclone | | |RCLONE_DIR_CACHE_TIME| How long a directory should be considered up to date and not refreshed from the backend #optional, but recommended is 10s. | 5m | |RCLONE_CACHE_DIR| Directory used for caching. | | |RCLONE_VFS_CACHE_MODE| Cache mode for VFS | | |RCLONE_VFS_CACHE_MAX_SIZE| Max size of the VFS cache | | |RCLONE_VFS_CACHE_MAX_AGE| Max age of the VFS cache | | |PLEX_USER| The Plex USERNAME for your account | || ✔️| |PLEX_TOKEN| The Plex Token associated with PLEX_USER | || ✔️| |PLEX_ADDRESS| The URL of your Plex server. Example: http://192.168.0.100:32400 or http://plex:32400 - format must include http:// or https:// and have no trailing characters after the port number (32400). E.g., / | || ✔️| |SHOW_MENU| Enable the plex_debrid menu to show upon startup, requiring user interaction before the program runs. Conversely, if the plex_debrid menu is disabled, the program will automatically run upon successful startup. If used, the value must be true or false | true | |PD_LOGFILE| Log file for plex_debrid. The log file will appear in the /config as plex_debrid.log. If used, the value must be true or false | false | |AUTO_UPDATE| Enable automatic updates of plex_debrid. Adding this variable will enable automatic updates to the latest version of plex_debrid locally within the container. No values are required. | false | |AUTO_UPDATE_INTERVAL| Interval between automatic update checks in hours. Vaules can be any positive whole or decimal point based number. Ex. a value of .5 would yield thirty minutes and 1.5 would yield one and a half hours | 24 | |DUPLICATE_CLEANUP| Automated cleanup of duplicate content in Plex. | false | |CLEANUP_INTERVAL| Interval between duplicate cleanup in hours. Vaules can be any positive whole or decimal point based number. Ex. a value of .5 would yield thirty minutes and 1.5 would yield one and a half hours | 24 | |PDZURG_LOG_LEVEL| The level at which logs should be captured. See the python Logging Levels documentation for more details | INFO | |PDZURG_LOG_COUNT| The number logs to retain. Result will be value + current log | 2 | |ZURG_ENABLED| Set the value "true" to enable the Zurg process | false | | | ✔️| |ZURG_VERSION| The version of Zurg to use. If enabled, the value should contain v0.9.x or v0.9.x-hotfix.x format | latest | | | | |ZURG_UPDATE| Set the value "true" to enable automatic updates of Zurg | false | | | | |LOG_LEVEL| Set the log level for Zurg | INFO | | | |

Data Volumes

The following table describes data volumes used by the container. The mappings are set via the -v parameter or via the docker-compose file within the volumes: section. Each mapping is specified with the following format: <HOST_DIR>:<CONTAINER_DIR>[:PERMISSIONS].

Container path Permissions Description
/config rw This is where the application stores the rclone.conf, plex_debrid settings.json, and any files needing persistence. CAUTION: rclone.conf is overwritten upon start/restart of the container. Do NOT use an existing rclone.conf file if you have other rclone services
/log rw This is where the application stores its log files
/data rshared This is where rclone will be mounted. Not required when only utilizing plex_debrid
/zurg/RD rw This is where Zurg will store the active configuration and data for RealDebrid. Not required when only utilizing plex_debrid
/zurg/AD rw This is where Zurg will store the active configuration and data for AllDebrid. Not required when only utilizing plex_debrid

TODO

See the pd_zurg roadmap for a list of planned features and enhancements.

Deployment

pd_zurg allows for the simultaneous or individual deployment of plex_debrid and/or rclone

For additional details on deployment, see the pd_zurg Wiki

Community

pd_zurg

  • For questions related to pd_zurg, see the GitHub discussions
  • or create a new issue if you find a bug or have an idea for an improvement.
  • or join the pd_zurg discord server

plex_debrid

  • For questions related to plex_debrid, see the GitHub discussions
  • or create a new issue if you find a bug or have an idea for an improvement.
  • or join the plex_debrid discord server

Buy itsToggle a beer/coffee? :)

If you enjoy the underlying projects and want to buy itsToggle a beer/coffee, feel free to use the real-debrid affiliate link or send a virtual beverage via PayPal :)

Buy yowmamasita a beer/coffee? :)

If you enjoy the underlying projects and want to buy yowmamasita a beer/coffee, feel free to use the GitHub sponsor link

Buy ncw a beer/coffee? :)

If you enjoy the underlying projects and want to buy Nick Craig-Wood a beer/coffee, feel free to use the website's sponsor links

GitHub Workflow Status

GitHub Workflow Status

About

A combined docker image for the unified deployment of itsToggle's, yowmamasita's, and ncw's projects -- plex_debrid, zurg, and rclone

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 92.2%
  • Shell 6.4%
  • Dockerfile 1.4%