captainVersion: 4
services:
    $$cap_appname:
        image: plexinc/pms-docker:$$cap_plex_version
        environment:
            TZ: $$cap_tz
            PLEX_CLAIM: $$cap_plex_token
            ADVERTISE_IP: http://$$cap_appname.$$cap_root_domain/
        ports:
            - 32400:32400
            - 3005:3005
            - 8324:8324
            - 32469:32469
            - 1900:1900
            - 32410:32410
            - 32412:32412
            - 32413:32413
            - 32414:32414
        hostname: $$cap_appname.$$cap_root_domain
        volumes:
            - $$cap_appname-config:/config
            - $$cap_appname-transcode:/transcode
            - $$cap_appname-media:/data
        caproverExtra:
            containerHttpPort: '32400'
caproverOneClickApp:
    variables:
        - id: $$cap_plex_version
          label: Plex Version
          defaultValue: 1.19.2.2737-b69929dab
          description: Check out their Docker page for the valid tags https://hub.docker.com/r/plexinc/pms-docker/tags
          validRegex: /^([^\s^\/])+$/
        - id: $$cap_plex_token
          label: Plex Claim Token
          description: Get your token from https://www.plex.tv/claim
          validRegex: /.{1,}/
        - id: $$cap_tz
          label: Time Zone
          defaultValue: America/New_York
          description: Get yours from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
          validRegex: /.{1,}/
    instructions:
        start: >-
            Plex organizes video, music and photos from personal media libraries and streams them to smart TVs, streaming boxes and mobile devices.


            IMPORTANT: Plex uses ports 32400, 3005, 8324, 32469, 1900, 32410, 32412, 32412, 32413, and 32414. If any of these ports are in use, your installation will malfunction.
        end: >-
            Plex has been successfully deployed. Please wait a minute before accessing your Plex dashboard. 


            If you're installing behind a NAT, make sure to forward port 32400.
    displayName: Plex Media Server
    isOfficial: true
    description: Plex organizes video, music and photos from personal media libraries and streams them to smart TVs, streaming boxes and mobile devices.
    documentation: Taken from https://hub.docker.com/r/plexinc/pms-docker.
