{ "Format": "hcl2", "JobID": "nginx", "JobModifyIndex": 13996170, "Namespace": "default", "Source": "job \"nginx\" {\n datacenters = [\"dc1\"]\n type = \"service\"\n group \"nginx\" {\n count = 1\n\n task \"nginx\" {\n driver = \"docker\"\n\n config {\n image = \"nginx\"\n ports = [\"http\"]\n\n volumes = [\n \"custom/default.conf:/etc/nginx/conf.d/default.conf\",\n ]\n }\n\n template {\n data = <Local Services - HTTP/HTTPS

\n \n \n \n \n \n \n {{range services}}\n {{range $i, $s :=service .Name}}\n {{ if eq $i 0 }}\n\n\n \n \n \n \n {{end}}\n {{end}}\n {{end}}\n
Service NameTraefikDirect
{{.Name}}{{.Name}}.service.dc1.consul{{ if eq .Name \"unifi\" }}https{{else}}http{{end}}://{{.Name}}.service.dc1.consul:{{.Port}}
\n

\n Node Environment Information:
\n node_id: {{ env \"node.unique.id\" }}
\n datacenter: {{ env \"NOMAD_DC\" }}\n

\n EOH\n\n destination = \"local/data/index.html\"\n change_mode = \"noop\"\n }\n\n resources {\n cpu = 100 # 100 MHz\n memory = 64 # 128 MB\n }\n service {\n name = \"nginx\"\n tags = [\"nginx\", \"web\", \"urlprefix-/nginx\", \"backend\"]\n port = \"http\"\n\n check {\n type = \"tcp\"\n interval = \"10s\"\n timeout = \"2s\"\n }\n }\n }\n\n network {\n port \"http\" {\n to = 8080\n }\n\n // port \"https\" {\n // to = 443\n // }\n }\n }\n}\n", "VariableFlags": null, "Variables": "", "Version": 0 }