commit 41fd51ab8a7e872b02ed4663c10e0fe186fa71a2 parent 957021fe4000109aaf0103162884a755c2a6ba61 Author: Andreas Gruhler <andreas.gruhler@adfinis.com> Date: Sat, 28 Sep 2024 17:07:15 +0200 feat(myheats-demo): use Nginx frontend ctxt Diffstat:
M | hcl/default/myheats-demo/myheats-demo.nomad | | | 29 | ++++------------------------- |
1 file changed, 4 insertions(+), 25 deletions(-)
diff --git a/hcl/default/myheats-demo/myheats-demo.nomad b/hcl/default/myheats-demo/myheats-demo.nomad @@ -16,7 +16,9 @@ job "myheats-demo" { } network { - port "frontend_http" {} + port "frontend_http" { + to = 80 + } port "api_http" {} port "frontend_https" { @@ -60,32 +62,9 @@ job "myheats-demo" { driver = "podman" config { - image = "127.0.0.1:5000/myheats:latest" - command = "/bin/sh" - # run dev build - args = ["-c", "node_modules/.bin/vite --host 0.0.0.0 --port ${NOMAD_PORT_frontend_http}"] + image = "127.0.0.1:5000/myheats-nginx:latest" force_pull = true ports = ["frontend_http"] - volumes = [ - # mount variables to app dir - "secrets/env:/app/.env.local", - ] - } - - template { - # render sensitive env vars in a template from Vault secrets - env = true - destination = "${NOMAD_SECRETS_DIR}/env" - data = file("./templates/frontend-env.local.tmpl") - } - template { - destination = "${NOMAD_TASK_DIR}/myheats-demo.conf" - data = file("./templates/nginx.conf.tmpl") - } - - volume_mount { - volume = "tls" - destination = "/etc/letsencrypt" } resources {