From 5ec0fdc9932242ec6cc6b1dd68a37a2d3a83fc3a Mon Sep 17 00:00:00 2001 From: Mathias Magnusson Date: Mon, 18 Sep 2023 23:50:05 +0200 Subject: Move nginx job spec --- jobs/virtual-hosting.nomad.hcl | 123 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 jobs/virtual-hosting.nomad.hcl (limited to 'jobs/virtual-hosting.nomad.hcl') diff --git a/jobs/virtual-hosting.nomad.hcl b/jobs/virtual-hosting.nomad.hcl new file mode 100644 index 0000000..2ed377f --- /dev/null +++ b/jobs/virtual-hosting.nomad.hcl @@ -0,0 +1,123 @@ +job "virtual-hosting" { + group "nginx" { + count = 1 + + network { + port "http" { + static = 80 + } + port "https" { + static = 443 + } + } + + volume "certs" { + type = "host" + source = "ca-certificates" + read_only = true + } + + task "nginx" { + driver = "docker" + + resources { + cpu = 50 + memory = 20 + } + + volume_mount { + volume = "certs" + destination = "/var/local/certs" + } + + config { + image = "nginx:1.25-alpine" + ports = ["http", "https"] + + volumes = [ + "local:/etc/nginx/conf.d", + ] + } + + template { + data = <