hashi-stack/nomad/jobs/nginx.nomad

49 lines
722 B
Plaintext
Raw Permalink Normal View History

2020-05-19 06:37:21 +02:00
job "nginx" {
region = "eu"
datacenters = ["us-west-1"]
group "webserver" {
count = 4
restart {
attempts = 10
interval = "5m"
delay = "25s"
mode = "delay"
}
task "nginx" {
driver = "docker"
config {
image = "nginx:latest"
port_map {
web = 80
}
}
service {
name = "nginx"
port = "web"
check {
name = "alive"
type = "tcp"
interval = "10s"
timeout = "2s"
}
}
resources {
cpu = 500 # 500 Mhz
memory = 64 # 64MB
network {
mbits = 10
port "web" {
}
}
}
}
}
}