10 lines
9.5 KiB
JSON
10 lines
9.5 KiB
JSON
{
|
|
"Format": "hcl2",
|
|
"JobID": "qbittorrent",
|
|
"JobModifyIndex": 14186766,
|
|
"Namespace": "default",
|
|
"Source": " job \"qbittorrent\" {\n # region = \"global\"\n datacenters = [\"dc1\"]\n type = \"service\"\n\n\n constraint {\n attribute = \"${attr.kernel.name}\"\n value = \"linux\"\n }\nconstraint {\n attribute = \"${attr.cpu.arch}\"\n operator = \"regexp\"\n value = \"amd64\"\n }\n update {\n # Stagger updates every 60 seconds\n stagger = \"90s\"\n max_parallel = 1\n healthy_deadline = \"2m\"\n health_check = \"task_states\"\n\n }\n\n group \"qbittorrent\" {\n count = 1\n\n restart {\n attempts = 8\n interval = \"20m\"\n delay = \"10s\"\n mode = \"delay\"\n }\n\n task \"qbittorrent-vpn\" {\n driver = \"docker\"\n lifecycle {\n hook = \"prestart\"\n sidecar = true\n }\n\n config {\n // image = \"registry.service.dc1.consul:5000/openpyn:latest\"\n // image = \"qmcgaw/gluetun\"\n image = \"qmcgaw/gluetun\"\n\n memory_hard_limit = \"1024\"\n ports = [\n \"shadowsocks\",\n \"http_proxy\",\n \"http_admin\",\n \"qbittorrent_51413\",\n \"qbittorrent_80\",\n \"socks\"\n ]\n\n cap_add = [\n \"NET_ADMIN\",\n \"NET_BIND_SERVICE\",\n ]\n\n #network_mode = \"host\"\n #network_mode = \"vpn\"\n\n volumes = [\n \"/etc/localtime:/etc/localtime\",\n \"/mnt/syncthing/mullvad:/vpn\",\n \"local/gluetun.toml:/gluetun/config.toml\"\n\n ]\n devices = [\n {\n host_path = \"/dev/net/tun\"\n container_path = \"/dev/net/tun\"\n },\n ]\n\n }\n\n\n template {\n data = <<EOH\n[[roles]]\nname = \"qbittorrent\"\n# Define a list of routes with the syntax \"Http-Method /path\"\nroutes = [\"GET /v1/openvpn/status\", \"PUT /v1/openvpn/status\", \"PUT /v1/openvpn/status\", \"GET /v1/openvpn/portforwarded\", \"GET /v1/openvpn/settings\", \"GET /v1/dns/status\", \"PUT /v1/dns/status\", \"PUT /v1/dns/status\", \"GET /v1/updater/status\", \"PUT /v1/updater/status\", \"PUT /v1/updater/status\", \"GET /v1/publicip/ip\", \"GET /v1/version\", \"GET /v1/vpn/status\", \"PUT /v1/vpn/status\", \"GET /v1/vpn/settings\", \"PUT /v1/vpn/settings\"]\nauth = \"none\"\n EOH\n\n destination = \"custom/auth.toml\"\n }\n\n\n env {\n VPN_SERVICE_PROVIDER=\"airvpn\"\n VPN_TYPE=\"wireguard\"\n WIREGUARD_PRIVATE_KEY=\"EIos1A9eGCIoCHr02aOsEu8S4C0gqhNLIYF/vMykEV0=\"\n WIREGUARD_PRESHARED_KEY=\"RzPcraPA24hLFxGiB7z5JMWrtI+JBbEzvmeiEX36XWo=\"\n WIREGUARD_ADDRESSES=\"10.161.31.240/32\"\n SERVER_COUNTRIES=\"Canada\"\n SERVER_CITIES=\"Vancouver,Montreal,Toronto\"\n FIREWALL_VPN_INPUT_PORTS = \"61944,53304\"\n HEALTH_TARGET_ADDRESS=\"1.1.1.1\"\n HEALTH_SUCCESS_WAIT_DURATION=\"30s\"\n HEALTH_VPN_DURATION_INITIAL=\"3600s\"\n HEALTH_VPN_DURATION_ADDITION=\"600s\"\n HTTP_CONTROL_SERVER_AUTH_CONFIG_FILEPATH=\"/custom/auth.toml\"\n // HEALTH_TARGET_ADDRESS=\"cloudflare.com:443\"\n \n \n ##Mullvad\n #VPNSP = \"mullvad\"\n #VPN_TYPE = \"wireguard\"\n #COUNTRY = \"Canada\"\n #CITY = \"Toronto\"\n #FIREWALL_VPN_INPUT_PORTS = \"56987\"\n #WIREGUARD_PRIVATE_KEY = \"iA64ImY2XNvml7s+HEHWNNGXeqpzFN0/KYGxhCsHLV8=\"\n #WIREGUARD_ADDRESS = \"10.64.141.217/32\"\n HTTPPROXY = \"on\"\n SHADOWSOCKS_PASSWORD = \"farscape5\"\n SHADOWSOCKS = \"on\"\n DOT_PROVIDERS = \"cloudflare,google,quad9,quadrant\"\n DOT = \"off\"\n WEBUI_PORT=8080\n }\n\n service {\n name = \"qbittorrent\"\n tags = [\"global\", \"tools\"]\n port = \"qbittorrent_80\"\n }\n\n service {\n name = \"${TASKGROUP}-admin\"\n tags = [\"global\"]\n port = \"http_admin\"\n }\n service {\n name = \"sp\"\n tags = [\"global\", \"ovpn-openpyn\",\n \"enable_gocast\",\n \"gocast_vip=192.168.1.242/32\",\n \"gocast_nat=tcp:1080:1080\",\n \"gocast_nat=udp:1080:1080\",\n ]\n port = \"socks\" \n }\n\n resources {\n cpu = 100 # 500 MHz\n memory = 250 # 128MB\n }\n } #task ovpn\n\n task \"dante\" {\n driver = \"docker\"\n\n config {\n image = \"serjs/go-socks5-proxy\"\n // image = \"ghcr.io/sstent/dante-wg:latest\"\n network_mode = \"container:qbittorrent-vpn-${NOMAD_ALLOC_ID}\"\n memory_hard_limit = 256\n\n devices = [\n {\n host_path = \"/dev/net/tun\"\n container_path = \"/dev/net/tun\"\n },\n ]\n }\n env {REQUIRE_AUTH=\"false\"}\n resources {\n cpu = 64 # 500 MHz\n memory = 128 # 128MB\n }\n } #end dante\n\n\n # task \"init\" {\n # driver = \"docker\"\n # lifecycle {\n # hook = \"prestart\"\n # sidecar = false\n # }\n # config {\n # memory_hard_limit = \"2048\"\n\n # image = \"ghcr.io/sstent/rsync\"\n # volumes = [\n # \"/mnt/configs/${NOMAD_GROUP_NAME}:/config\",\n # \"/mnt/Public/config/${NOMAD_GROUP_NAME}:/configbackup\",\n # \"/mnt/Public/config/locks:/locks\"\n # ]\n\n # args = [\"flock\", \"-x\", \"/locks/${NOMAD_GROUP_NAME}_rsync.lock\", \"rsync\", \"-av\", \"/configbackup/\", \"/config/\", \"--delete-before\"]\n # }\n # resources {\n # cpu = 20 # 500 MHz\n # memory = 20 # 128MB\n # }\n # }\n\n\n # task \"finalsync\" {\n # driver = \"docker\"\n # lifecycle {\n # hook = \"poststop\"\n # }\n # config {\n # memory_hard_limit = \"2048\"\n\n # image = \"ghcr.io/sstent/rsync\"\n # volumes = [\n # \"/mnt/configs/${NOMAD_GROUP_NAME}:/config\",\n # \"/mnt/Public/config/${NOMAD_GROUP_NAME}:/configbackup\",\n # \"/mnt/Public/config/locks:/locks\"\n # ]\n\n # args = [\"flock\", \"-x\", \"/locks/${NOMAD_GROUP_NAME}_rsync.lock\", \"rsync\", \"-av\", \"--delete\", \"/config/\", \"/configbackup/\"]\n # }\n # resources {\n # cpu = 20 # 500 MHz\n # memory = 128 # 128MB\n # }\n # }\n\n\n # task \"sync\" {\n # driver = \"docker\"\n # lifecycle {\n # hook = \"poststart\"\n # sidecar = true\n # }\n # config {\n # memory_hard_limit = \"2048\"\n\n # image = \"ghcr.io/sstent/rsync\"\n # volumes = [\n # \"/mnt/configs/:/configs\",\n # \"/mnt/Public/config/${NOMAD_GROUP_NAME}:/configbackup\",\n # ]\n # args = [\"client\"]\n # }\n # env {\n # CRON_TASK_1 = \"25 8-20 * * * chmod a-w /configs/${NOMAD_GROUP_NAME}/ ; rsync -avz --delete /configs/${NOMAD_GROUP_NAME}/ /configbackup/; chmod a+w /configs/${NOMAD_GROUP_NAME}/;\"\n\n # }\n # resources {\n # cpu = 20 # 500 MHz\n # memory = 20 # 128MB\n # }\n # } #end sync\n\n\n task \"qbittorrent\" {\n driver = \"docker\"\n\n // \"/mnt/Public/config/qbittorrent:/config\",\n config {\n image = \"linuxserver/qbittorrent:5.1.0\"\n network_mode = \"container:qbittorrent-vpn-${NOMAD_ALLOC_ID}\"\n memory_hard_limit = 2048\n\n #cpuset_cpus = \"4-7\"\n\n volumes = [\n \"/mnt/Public/Downloads/news/qbittorrent:/downloads/\",\n \"/mnt/configs/qbittorrent:/config\",\n \"/mnt/Archive/seeding:/archiveseeding\",\n \"/mnt/odroid5:/odroid5\",\n ]\n // ulimit {\n // nproc = \"4242\"\n // nofile = \"2048:4096\"\n // }\n sysctl = {\n \"net.core.somaxconn\" = \"4096\"\n }\n }\n env {\n TZ = \"EST5EDT\"\n PUID = 1000\n PGID = 1000\n WEBUI_PORT=8080\n }\n service {\n name = \"qb\"\n tags = [\"global\", \"ovpn-openpyn\",\n \"enable_gocast\",\n \"gocast_vip=192.168.1.244/32\",\n \"gocast_nat=tcp:8080:8080\",\n \"gocast_nat=udp:8080:8080\" \n ]\n port = \"qbittorrent_80\"\n \n }\n\n template {\n data = <<EOH\n #!/bin/bash\n curl -sL http://127.0.0.1:8080/api/v2/transfer/info | grep connected || exit;\n EOH\n\n destination = \"local/qbithealth.sh\"\n change_mode = \"noop\"\n perms = \"0777\"\n }\n\n resources {\n cpu = 128 # 500 MHz\n memory = 256 # 128MB\n }\n } #task resilio-sync\n\n network {\n // mode = \"bridge\"\n port \"qbittorrent_51413\" {\n static = 6881\n to = 6881\n }\n\n port \"shadowsocks\" {\n static = \"8388\"\n to = \"8388\"\n }\n port \"socks\" {\n static = \"1080\"\n to = \"1080\"\n }\n\n port \"http_proxy\" {\n static = \"8888\"\n to = \"8888\"\n }\n port \"http_admin\" {\n static = \"8000\"\n to = \"8000\"\n }\n\n\n port \"qbittorrent_80\" {\n static = 8080\n to = 8080\n }\n\n }\n } #group \"au-proxy\"\n}\n\n// }\n\n",
|
|
"VariableFlags": null,
|
|
"Variables": "",
|
|
"Version": 21
|
|
} |