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
|
|
|
}
|
2021-05-14 08:32:40 +00:00
|
|
|
port "https" {
|
|
|
|
static = 443
|
|
|
|
}
|
2021-05-08 12:25:56 +00:00
|
|
|
}
|
|
|
|
|
2021-05-14 08:32:40 +00:00
|
|
|
# volume "certs" {
|
|
|
|
# type = "host"
|
|
|
|
# source = "ca-certificates"
|
|
|
|
# # read_only = true
|
|
|
|
# }
|
|
|
|
|
2021-05-08 12:25:56 +00:00
|
|
|
service {
|
|
|
|
name = "nginx"
|
|
|
|
port = "http"
|
|
|
|
}
|
|
|
|
|
|
|
|
task "nginx" {
|
|
|
|
driver = "docker"
|
|
|
|
|
|
|
|
config {
|
2021-05-14 08:32:40 +00:00
|
|
|
ports = ["http", "https"]
|
2021-05-08 14:36:44 +00:00
|
|
|
image = "nginx"
|
2021-05-08 12:25:56 +00:00
|
|
|
volumes = [
|
|
|
|
"local:/etc/nginx/conf.d",
|
2021-05-14 08:32:40 +00:00
|
|
|
#"certs:..."
|
2021-05-08 12:25:56 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
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"
|
|
|
|
}
|
2021-06-05 06:58:36 +00:00
|
|
|
|
|
|
|
template {
|
|
|
|
data = file("../config/gitea.tpl")
|
|
|
|
destination = "local/gitea.conf"
|
|
|
|
change_mode = "signal"
|
|
|
|
change_signal = "SIGHUP"
|
|
|
|
}
|
2021-05-08 12:25:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|