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" {
|
2020-09-14 17:00:55 +00:00
|
|
|
network {
|
|
|
|
port "http" {
|
|
|
|
to = 8080
|
|
|
|
}
|
|
|
|
}
|
2019-04-01 19:52:58 +00:00
|
|
|
task "simpleweb" {
|
|
|
|
driver = "docker"
|
|
|
|
|
|
|
|
config {
|
2019-12-12 17:45:16 +00:00
|
|
|
image = "nginx:latest"
|
2019-04-01 19:52:58 +00:00
|
|
|
|
2020-09-14 18:55:17 +00:00
|
|
|
ports = ["http"]
|
|
|
|
}
|
2019-04-01 19:52:58 +00:00
|
|
|
|
|
|
|
resources {
|
2019-12-12 17:45:16 +00:00
|
|
|
cpu = 256
|
2019-04-01 19:52:58 +00:00
|
|
|
memory = 128
|
|
|
|
}
|
|
|
|
|
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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|