10 lines
4.0 KiB
JSON
10 lines
4.0 KiB
JSON
{
|
|
"Format": "hcl2",
|
|
"JobID": "radarr",
|
|
"JobModifyIndex": 13928632,
|
|
"Namespace": "default",
|
|
"Source": "# There can only be a single job definition per file.\n# Create a job with ID and Name 'example'\njob \"radarr\" {\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 }\nconstraint {\n attribute = \"${attr.cpu.arch}\"\n operator = \"regexp\"\n value = \"arm64\"\n }\n\n\n update {\n stagger = \"10s\"\n max_parallel = 1\n }\n\n group \"radarr\" {\n count = 1\n\n restart {\n attempts = 5\n interval = \"1m\"\n delay = \"10s\"\n mode = \"delay\"\n }\n\n task \"radarr\" {\n driver = \"docker\"\n\n config {\n // image = \"linuxserver/radarr:nightly\"\n image = \"linuxserver/radarr:latest\"\n dns_servers = [\"192.168.4.250\", \"192.168.4.1\"]\n ports = [\"http\"]\n memory_hard_limit = \"2048\"\n // cpuset_cpus = \"4-7\"\n\n volumes = [\n \"/mnt/Public/Downloads/news:/downloads\",\n \"/mnt/Public/Downloads/movies:/movies\",\n // \"/mnt/configs/radarr:/config\",\n \"/mnt/Archive/Movies:/archive\",\n \"/mnt/Public/configs/radarr_pg:/config\",\n // \"local/config.xml:/config/config.xml\"\n ]\n }\n\n template {\n data = \"---\\nkey: {{ key \\\"ovpn-client\\\" }}\"\n destination = \"local/file.yml\"\n change_mode = \"restart\"\n }\n template {\n data = <<EOH\n<Config>\n<LogLevel>Info</LogLevel>\n<Port>7878</Port>\n<UrlBase/>\n<BindAddress>*</BindAddress>\n<SslPort>9898</SslPort>\n<EnableSsl>False</EnableSsl>\n<ApiKey>237c27f22504440385e5ee295fd65eb5</ApiKey>\n<AuthenticationMethod>Forms</AuthenticationMethod>\n<Branch>master</Branch>\n<SslCertPath/>\n<LaunchBrowser>True</LaunchBrowser>\n<SslCertPassword/>\n<UpdateMechanism>Docker</UpdateMechanism>\n<AnalyticsEnabled>False</AnalyticsEnabled>\n<InstanceName>Radarr</InstanceName>\n<AuthenticationRequired>DisabledForLocalAddresses</AuthenticationRequired>\n<PostgresUser>postgres</PostgresUser>\n<PostgresPassword>postgres</PostgresPassword>\n<PostgresPort>5432</PostgresPort>\n<PostgresHost>master.postgres.service.dc1.consul</PostgresHost>\n</Config>\n EOH\n\n destination = \"local/config.xml\"\n perms = \"0755\"\n }\n\n service {\n name = \"${TASKGROUP}\"\n tags = [\"radarr\", \"tools\"]\n port = \"http\"\n\n check {\n type = \"script\"\n name = \"check_up\"\n command = \"/local/healthcheck.sh\"\n interval = \"5m\"\n timeout = \"25s\"\n\n check_restart {\n limit = 3\n grace = \"90s\"\n ignore_warnings = false\n } \n }\n }\n template {\n data = <<EOH\n#!/bin/bash\n/usr/bin/curl -f \"http://localhost:${NOMAD_PORT_http}/api/v3/system/status?apikey=$(grep -Eo '<ApiKey>(.*)</ApiKey>' /config/config.xml | sed -e 's/<[^>]*>//g')\"\n EOH\n\n destination = \"local/healthcheck.sh\"\n perms = \"0755\"\n }\n\n env {\n TZ = \"EST5EDT\"\n PUID = 1000\n PGID = 1000\n }\n\n resources {\n cpu = 500 # 500 MHz\n memory = 256 # 128MB\n\n // network {\n // port \"radarr\" {\n // static = \"7878\"\n // }\n // }\n }\n\n logs {\n max_files = 10\n max_file_size = 15\n }\n\n kill_timeout = \"10s\"\n } #Task\n\n network {\n // mode = \"bridge\"\n port \"http\" {\n static = 7878\n to = 7878\n }\n }\n } #Group\n}\n",
|
|
"VariableFlags": null,
|
|
"Variables": "",
|
|
"Version": 13
|
|
} |