Files
NomadBackup/nomad_backup/20251115_142246/prowlarr.json
2025-11-21 13:07:40 -08:00

10 lines
3.6 KiB
JSON

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