captainVersion: 4
services:
    $$cap_appname:
        image: linuxserver/qbittorrent:$$cap_qbittorrent_version
        environment:
            TZ: $$cap_tz
            UMASK_SET: 022
            WEBUI_PORT: $$cap_webui_port
        ports:
            - $$cap_webui_port:8080
            - 6881:6881
        hostname: $$cap_appname.$$cap_root_domain
        volumes:
            - $$cap_appname-config:/config
            - $$cap_path_to_downloads:/downloads
        caproverExtra:
            containerHttpPort: $$cap_webui_port
caproverOneClickApp:
    variables:
        - id: $$cap_qbittorrent_version
          label: qBittorrent Version
          defaultValue: version-14.2.5.99202004250119-7015-2c65b79ubuntu18.04.1
          description: Check out their Docker page for the valid tags https://hub.docker.com/r/linuxserver/qbittorrent/tags
          validRegex: /^([^\s^\/])+$/
        - id: $$cap_tz
          label: Time Zone
          defaultValue: Europe/Brussels
          description: Get yours from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
          validRegex: /.{1,}/
        - id: $$cap_webui_port
          label: qBittorrent WebUI Port
          description: The port used to access qBittorrent
          validRegex: /\d/
        - id: $$cap_path_to_downloads
          label: Path to downloads folder
          description: Path to downloads folder where u want to save the downloaded torrents
          validRegex: /\/[^\s-][a-zA-Z0-9_\/-]*[^\/][^\s-]/
    instructions:
        start: >-
            The qBittorrent project aims to provide an open-source software alternative to µTorrent.
            qBittorrent is based on the Qt toolkit and libtorrent-rasterbar library.
        end: >-
            qBittorrent is deployed and available as $$cap_appname.
    displayName: qBittorrent
    isOfficial: true
    description: qBittorrent BitTorrent client
    documentation: Taken from https://hub.docker.com/r/linuxserver/qbittorrent.
