captainVersion: 4
services:
    $$cap_appname:
        image: linuxserver/bazarr:$$cap_bazarr_version
        environment:
            TZ: $$cap_tz
            PUID: $$cap_puid
            PGID: $$cap_guid
        hostname: $$cap_appname.$$cap_root_domain
        volumes:
            - $$cap_appname-config:/config
            - $$cap_path_to_movies:/movies
            - $$cap_path_to_tv:/tv
        caproverExtra:
            containerHttpPort: 6767
caproverOneClickApp:
    variables:
        - id: $$cap_bazarr_version
          label: Bazarr Version
          defaultValue: '1.0.1'
          description: Check out their Docker page for the valid tags https://hub.docker.com/r/linuxserver/bazarr/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_path_to_movies
          label: Location of TV library on disk
          description: Location of TV library on disk
          validRegex: /\/[^\s-][a-zA-Z0-9_\/-]*[^\/][^\s-]/

        - id: $$cap_path_to_tv
          label: Location of movie library on disk
          description: Location of movie library on disk
          validRegex: /\/[^\s-][a-zA-Z0-9_\/-]*[^\/][^\s-]/

        - id: $$cap_puid
          label: User ID
          defaultValue: '1000'
          description: User ID that the process uses, run (id $user) in your instance to see the id
          validRegex: /.{1,}/

        - id: $$cap_guid
          label: Group ID
          defaultValue: '1000'
          description: Group ID that the process uses, run (id $user) in your instance to see the id
          validRegex: /.{1,}/

    instructions:
        start: >-
            Bazarr is a companion application to Sonarr and Radarr.

            It can manage and download subtitles based on your requirements.

            You define your preferences by TV show or movie and Bazarr takes care of everything for you.
        end: >-
            Bazarr is deployed and available at http://$$cap_appname.$$cap_root_domain.
    displayName: Bazarr
    isOfficial: true
    description: Bazarr is a companion application to Sonarr and Radarr. It can manage and download subtitles based on your requirements.
    documentation: Taken from https://hub.docker.com/r/linuxserver/bazarr.
