infrastructure/hammerhead/app/nginx/deploy/nginx.hcl

54 lines
983 B
HCL
Raw Normal View History

job "nginx" {
datacenters = ["dc1"]
group "nginx" {
count = 1
network {
port "http" {
static = 80
}
2021-05-14 08:32:40 +00:00
port "https" {
static = 443
}
}
2021-05-14 08:32:40 +00:00
# volume "certs" {
# type = "host"
# source = "ca-certificates"
# # read_only = true
# }
service {
name = "nginx"
port = "http"
}
task "nginx" {
driver = "docker"
config {
2021-05-14 08:32:40 +00:00
ports = ["http", "https"]
image = "nginx"
volumes = [
"local:/etc/nginx/conf.d",
2021-05-14 08:32:40 +00:00
#"certs:..."
]
}
template {
data = file("../config/dummy-http-server.tpl")
destination = "local/dummy-http-server.conf"
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"
}
}
}
}