2019-12-12 17:45:16 +00:00
|
|
|
job "simpleweb" {
|
2019-04-01 19:52:58 +00:00
|
|
|
datacenters = ["dc1"]
|
2019-10-11 12:00:05 +00:00
|
|
|
type = "system"
|
2019-04-01 19:52:58 +00:00
|
|
|
|
2019-11-25 18:31:00 +00:00
|
|
|
constraint {
|
|
|
|
attribute = "${attr.kernel.name}"
|
|
|
|
value = "linux"
|
|
|
|
}
|
|
|
|
|
2019-04-01 19:52:58 +00:00
|
|
|
group "simpleweb" {
|
|
|
|
task "simpleweb" {
|
|
|
|
driver = "docker"
|
|
|
|
|
|
|
|
config {
|
2019-12-12 17:45:16 +00:00
|
|
|
image = "nginx:latest"
|
2019-04-01 19:52:58 +00:00
|
|
|
|
|
|
|
port_map {
|
|
|
|
http = 8080
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
2019-12-12 17:45:16 +00:00
|
|
|
cpu = 256
|
2019-04-01 19:52:58 +00:00
|
|
|
memory = 128
|
|
|
|
|
|
|
|
network {
|
|
|
|
mbits = 1
|
2019-11-19 15:36:41 +00:00
|
|
|
port "http"{}
|
2019-04-01 19:52:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-12 17:45:16 +00:00
|
|
|
// TODO(tgross): this isn't passing health checks
|
2019-04-01 19:52:58 +00:00
|
|
|
service {
|
|
|
|
port = "http"
|
|
|
|
name = "simpleweb"
|
|
|
|
tags = ["simpleweb"]
|
|
|
|
|
|
|
|
check {
|
|
|
|
type = "tcp"
|
|
|
|
port = "http"
|
|
|
|
interval = "10s"
|
|
|
|
timeout = "2s"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|