# There can only be a single job definition per file. # Create a job with ID and Name 'example' job "prowlarr" { datacenters = ["dc1"] type = "service" constraint { attribute = "${attr.kernel.name}" value = "linux" } constraint { attribute = "${attr.unique.hostname}" operator = "regexp" value = "odroid.*" } update { stagger = "10s" max_parallel = 1 } group "prowlarr" { count = 1 restart { attempts = 2 interval = "1m" delay = "10s" mode = "fail" } task "flaresolver" { driver = "docker" config { image = "ghcr.io/flaresolverr/flaresolverr:latest" ports = ["http_flare"] dns_servers = ["${attr.unique.network.ip-address}","192.168.4.250","8.8.8.8"] memory_hard_limit = "2048" force_pull = false } service { name = "${TASKGROUP}" tags = ["prowlarr_pg", "tools"] port = "http_flare" } } task "prowlarr" { driver = "docker" config { image = "ghcr.io/linuxserver/prowlarr:develop" ports = ["http"] dns_servers = ["${attr.unique.network.ip-address}","192.168.4.250","8.8.8.8"] memory_hard_limit = "2048" volumes = [ "/mnt/Public/configs/prowlarr_pg:/config", ] force_pull = false } service { name = "${TASKGROUP}" tags = ["prowlarr_pg", "tools"] port = "http" // check { // type = "script" // name = "check_up" // command = "/local/healthcheck.sh" // interval = "60s" // timeout = "5s" // check_restart { // limit = 3 // grace = "90s" // ignore_warnings = false // } // // export API=$(grep -Po '\K.8-20 * * *?(?=<.8-20 * * *?>)' /config/config.xml) // // curl -f "http://localhost:9696/api/v1/system/status?apikey=$API" // } } template { data = <\K.*?(?=<.*?>)' /config/config.xml)" EOH destination = "local/healthcheck.sh" perms = "0755" } env { // SHARE = "Public;/mount/Public;yes;no;yes;all;none;;Public" # GLOBAL = "socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536" # PERMISSIONS = "true" # WORKGROUP = "WORKGROUP" TZ = "EST5EDT" PUID = 1000 PGID = 1000 } # We must specify the resources required for # this task to ensure it runs on a machine with # enough capacity. resources { cpu = 500 # 500 MHz memory = 256 # 128MB } # Specify configuration related to log rotation logs { max_files = 10 max_file_size = 15 } # Controls the timeout between signalling a task it will be killed # and killing the task. If not set a default is used. kill_timeout = "10s" } #End main task network { // mbits = 100 port "http" { static = 9696 to = 9696 } port "http_flare" { static = 8191 to = 8191 } } } }