Skip to content
Next Hat
All Statefiles
Nanocl v0.18Statefile 0.1.0

Sonarr

Deploy sonarr server using LinuxServer.io image.

Description

Sonarr is a TV series collection manager for Usenet and Torrent users. This cargo uses the LinuxServer.io image. It will allow you to automate downloads and manage your TV library through a web interface. Documentation: https://docs.linuxserver.io/images/docker-sonarr Source: https://github.com/linuxserver/docker-sonarr

Synopsis

SH
nanocl state apply -s nr.next-hat.com/v0.18/sonarr/0.1.0 -- [--help] ARGUMENTS
nanocl state rm -s nr.next-hat.com/v0.18/sonarr/0.1.0 -- [--help] ARGUMENTS

Arguments

ArgumentTypeDescriptionDefault
--namespace
Optional
StringNanocl namespace to deploy the cargoglobal
--name
Optional
StringName of the cargosonarr
--puid
Optional
StringChange this to your user ID1000
--pgid
Optional
StringChange this to your group ID1000
--timezone
Optional
StringChange this to your timezoneEtc/UTC
--base-dir-path
Optional
StringBase path for container configurations/opt/nanocl/containers
--media-dir-path
Optional
StringBase path for media files/opt/media
--downloads-dir-path
Optional
StringPath to the downloads directory used by your downloader (e.g. Deluge)/opt/nanocl/containers/deluge/downloads
--proxy-network
Optional
StringThe network the proxy will bind to in order to be accessible using the domainAll
--domain
Optional
StringDomain to use for the proxy rules—
--enable_internal_gateway
Optional
BooleanAdd $$INTERNAL_GATEWAY to container DNS when enabled—
--enable_internal_dns
Optional
BooleanCreate an internal DNS rule for this cargo when enabled—

Render locally

Render this Statefile and save the result to Statefile.yml for review before applying it.

Pass any required Statefile arguments after --.

SH
nanocl state render -s nr.next-hat.com/v0.18/sonarr/0.1.0 -o Statefile.yml

Content

YAML
ApiVersion: v0.18
Args:
  - Name: namespace
    Kind: String
    Default: global
    Description: Nanocl namespace to deploy the cargo
  - Name: name
    Kind: String
    Default: sonarr
    Description: Name of the cargo
  - Name: puid
    Kind: String
    Default: '1000'
    Description: Change this to your user ID
  - Name: pgid
    Kind: String
    Default: '1000'
    Description: Change this to your group ID
  - Name: timezone
    Kind: String
    Default: Etc/UTC
    Description: Change this to your timezone
  - Name: base-dir-path
    Kind: String
    Default: /opt/nanocl/containers
    Description: Base path for container configurations
  - Name: media-dir-path
    Kind: String
    Default: /opt/media
    Description: Base path for media files
  - Name: downloads-dir-path
    Kind: String
    Default: /opt/nanocl/containers/deluge/downloads
    Description: Path to the downloads directory used by your downloader (e.g. Deluge)
  - Name: proxy-network
    Kind: String
    Default: All
    Description: >-
      The network the proxy will bind to in order to be accessible using the
      domain
  - Name: domain
    Kind: String
    Description: Domain to use for the proxy rules
  - Name: enable_internal_gateway
    Kind: Boolean
    Description: Add $$INTERNAL_GATEWAY to container DNS when enabled
  - Name: enable_internal_dns
    Kind: Boolean
    Description: Create an internal DNS rule for this cargo when enabled
Namespace: ${{ Args.namespace }}
Cargoes:
  - Name: ${{ Args.name }}
    Dns:
      - $$INTERNAL_GATEWAY
    Containers:
      - Name: sonarr
        Image: lscr.io/linuxserver/sonarr:latest
        Env:
          - PUID=${{ Args.puid }}
          - PGID=${{ Args.pgid }}
          - TZ=${{ Args.timezone }}
        HostConfig:
          Binds:
            - ${{ Args.base-dir-path }}/${{ Args.name }}/config:/config
            - ${{ Args.media-dir-path }}/tv:/tv
            - ${{ Args.downloads-dir-path }}:/downloads
Resources:
  - Name: http.${{ Args.domain }}
    Kind: ncproxy.io/rule
    Data:
      Rules:
        - Domain: ${{ Args.domain }}
          Network: ${{ Args.proxy-network }}
          Locations:
            - Path: /
              Target:
                Key: ${{ Args.namespace }}.${{ Args.name }}.c
                Port: 8989
  - Name: dns.${{ Args.domain }}
    Kind: ncdns.io/rule
    Data:
      Network: Internal
      Entries:
        - Name: ${{ Args.domain }}
          IpAddress: Internal