# There can only be a single job definition per file. # Create a job with ID and Name 'example' job "radarr" { datacenters = ["dc1"] type = "service" constraint { attribute = "${attr.kernel.name}" value = "linux" } constraint { attribute = "${attr.unique.hostname}" operator = "regexp" value = "odroid.*" } constraint { attribute = "${attr.cpu.arch}" operator = "regexp" value = "arm64" } update { stagger = "10s" max_parallel = 1 } group "radarr" { count = 1 restart { attempts = 5 interval = "1m" delay = "10s" mode = "delay" } task "radarr" { driver = "docker" config { // image = "linuxserver/radarr:nightly" image = "linuxserver/radarr:latest" dns_servers = ["${attr.unique.network.ip-address}","192.168.4.250","8.8.8.8"] ports = ["http"] memory_hard_limit = "2048" // cpuset_cpus = "4-7" volumes = [ "/mnt/Public/Downloads/news:/downloads", "/mnt/Public/Downloads/movies:/movies", // "/mnt/configs/radarr:/config", "/mnt/Archive/Movies:/archive", "/mnt/Public/configs/radarr_pg:/config", // "local/config.xml:/config/config.xml" ] } template { data = "---\nkey: {{ key \"ovpn-client\" }}" destination = "local/file.yml" change_mode = "restart" } template { data = < Info 7878 * 9898 False 237c27f22504440385e5ee295fd65eb5 Forms master True Docker False Radarr DisabledForLocalAddresses postgres postgres 5432 master.postgres.service.dc1.consul EOH destination = "local/config.xml" perms = "0755" } service { name = "${TASKGROUP}" tags = ["radarr", "tools"] port = "http" check { type = "script" name = "check_up" command = "/local/healthcheck.sh" interval = "5m" timeout = "25s" check_restart { limit = 3 grace = "90s" ignore_warnings = false } } } template { data = <(.*)' /config/config.xml | sed -e 's/<[^>]*>//g')" EOH destination = "local/healthcheck.sh" perms = "0755" } env { TZ = "EST5EDT" PUID = 1000 PGID = 1000 } resources { cpu = 500 # 500 MHz memory = 256 # 128MB // network { // port "radarr" { // static = "7878" // } // } } logs { max_files = 10 max_file_size = 15 } kill_timeout = "10s" } #Task network { // mode = "bridge" port "http" { static = 7878 to = 7878 } } } #Group }