diff options
Diffstat (limited to 'jobs/hövd.ing/hövd.ing.nomad.hcl')
-rw-r--r-- | jobs/hövd.ing/hövd.ing.nomad.hcl | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/jobs/hövd.ing/hövd.ing.nomad.hcl b/jobs/hövd.ing/hövd.ing.nomad.hcl new file mode 100644 index 0000000..dd06924 --- /dev/null +++ b/jobs/hövd.ing/hövd.ing.nomad.hcl @@ -0,0 +1,62 @@ +job "hövd.ing" { + group "web" { + count = 1 + + network { + port "http" { + to = 80 + } + } + + service { + name = "hovding" + port = "http" + provider = "nomad" + + tags = [ + "nginx.hostname=.xn--hvd-sna.ing", + "nginx.certname=xn--hvd-sna.ing", + ] + } + + task "web" { + driver = "docker" + + resources { + cpu = 50 + memory = 20 + } + + config { + image = "nginx:1.25-alpine" + ports = ["http"] + + volumes = [ + "local/config:/etc/nginx/conf.d", + "local/html:/var/www/html", + ] + } + + template { + data = <<EOF +server { + listen 80 default_server; + listen [::]:80 default_server; + http2 on; + + root /var/www/html; + location / { + index index.html; + } +} +EOF + destination = "local/config/website.conf" + } + + template { + data = file("jobs/hövd.ing/index.html") + destination = "local/html/index.html" + } + } + } +} |