2021-05-08 12:25:56 +00:00
|
|
|
job "nginx" {
|
|
|
|
datacenters = ["dc1"]
|
|
|
|
|
|
|
|
group "nginx" {
|
|
|
|
count = 1
|
|
|
|
|
|
|
|
network {
|
|
|
|
port "http" {
|
2021-05-08 14:36:44 +00:00
|
|
|
static = 80
|
2021-05-08 12:25:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
service {
|
|
|
|
name = "nginx"
|
|
|
|
port = "http"
|
|
|
|
}
|
|
|
|
|
|
|
|
task "nginx" {
|
|
|
|
driver = "docker"
|
|
|
|
|
|
|
|
config {
|
|
|
|
ports = ["http"]
|
2021-05-08 14:36:44 +00:00
|
|
|
image = "nginx"
|
2021-05-08 12:25:56 +00:00
|
|
|
volumes = [
|
|
|
|
"local:/etc/nginx/conf.d",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
2021-05-08 14:36:44 +00:00
|
|
|
data = file("../config/dummy-http-server.tpl")
|
|
|
|
destination = "local/dummy-http-server.conf"
|
2021-05-08 12:25:56 +00:00
|
|
|
change_mode = "signal"
|
|
|
|
change_signal = "SIGHUP"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|