Learn NOMAD with Real Code Examples
Updated Nov 27, 2025
Code Sample Descriptions
1
Simple Nomad Job
# nomad/demo/nginx.nomad
job "nginx" {
type = "service"
datacenters = ["dc1"]
group "web" {
task "nginx" {
driver = "docker"
config {
image = "nginx:1.21"
ports = ["http"]
}
resources {
cpu = 500
memory = 256
}
service {
name = "nginx"
port = "http"
}
}
network {
port "http" {
static = 8080
}
}
}
}
A simple Nomad job to run an Nginx container.