# Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: MPL-2.0 job "nomad-proxy" { datacenters = ["dc1", "dc2"] namespace = "proxy" constraint { attribute = "${attr.kernel.name}" value = "linux" } group "proxy" { network { port "www" { static = 6464 to = 443 } } task "nginx" { driver = "docker" config { image = "nginx:latest" ports = ["www"] mount { type = "bind" source = "local/nginx.conf" target = "/etc/nginx/nginx.conf" } mount { type = "bind" source = "/etc/nomad.d/tls/tls_proxy.key" target = "/etc/ssl/tls_proxy.key" } mount { type = "bind" source = "/etc/nomad.d/tls/tls_proxy.crt" target = "/etc/ssl/tls_proxy.crt" } mount { type = "bind" source = "/etc/nomad.d/tls/self_signed.key" target = "/etc/ssl/self_signed.key" } mount { type = "bind" source = "/etc/nomad.d/tls/self_signed.crt" target = "/etc/ssl/self_signed.crt" } } resources { cpu = 256 memory = 128 } # this template is mostly lifted from the Learn Guide: # https://learn.hashicorp.com/tutorials/nomad/reverse-proxy-ui template { destination = "local/nginx.conf" data = <