From f61deb124f06129d6252371d9440ae30841f3498 Mon Sep 17 00:00:00 2001 From: Diego Silva Date: Mon, 2 Feb 2026 19:22:36 -0500 Subject: [PATCH 1/2] Update Nomad job files for improved configuration and artifact versioning - Update `from-github.nomad` to use the latest artifact version (v3) from GitHub. - Modify `from-local.nomad` to add dynamic port configuration, debug port, and environment variables for IP and port management. --- from-github.nomad | 2 +- from-local.nomad | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/from-github.nomad b/from-github.nomad index 1f46a60..b9186d4 100644 --- a/from-github.nomad +++ b/from-github.nomad @@ -10,7 +10,7 @@ job "from-github" { task "api" { driver = "java" artifact { - source = "https://github.com/apuntesdejava/java-nomad-example/releases/download/2/java-nomad-example-runner.jar" + source = "https://github.com/apuntesdejava/java-nomad-example/releases/download/3/java-nomad-example-runner.jar" destination = "local" } config { diff --git a/from-local.nomad b/from-local.nomad index 8e8827f..8a43a71 100644 --- a/from-local.nomad +++ b/from-local.nomad @@ -10,19 +10,26 @@ job "from-local" { group "backend" { count = 1 network { - port "http" { - static = 8080 - } + port "http" {} + port "debug" {} } task "api" { driver = "raw_exec" config { command = "java" args = [ + "-Dquarkus.http.port=${NOMAD_PORT_http}", + "-Dquarkus.http.host=0.0.0.0", + "-Ddebug.port=${NOMAD_PORT_debug}", "-jar", var.jar_path ] } + + env { + MY_IP_ADDRESS = "${NOMAD_IP_http}" + MY_PORT = "${NOMAD_PORT_http}" + } } } From 2d974895381fdbefdc9903fc91f649a995883d12 Mon Sep 17 00:00:00 2001 From: Diego Silva Date: Mon, 2 Feb 2026 19:23:54 -0500 Subject: [PATCH 2/2] Update `from-github.nomad` to reference artifact version 4 --- from-github.nomad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/from-github.nomad b/from-github.nomad index b9186d4..65c37bc 100644 --- a/from-github.nomad +++ b/from-github.nomad @@ -10,7 +10,7 @@ job "from-github" { task "api" { driver = "java" artifact { - source = "https://github.com/apuntesdejava/java-nomad-example/releases/download/3/java-nomad-example-runner.jar" + source = "https://github.com/apuntesdejava/java-nomad-example/releases/download/4/java-nomad-example-runner.jar" destination = "local" } config {