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

73 lines
1.4 KiB
HCL
Raw Normal View History

job "nginx" {
datacenters = ["dc1"]
group "nginx" {
count = 1
network {
2021-06-18 10:33:46 +00:00
mode = "bridge"
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"
}
2021-06-18 10:33:46 +00:00
service {
name = "nginx-gitea-frontend-connector"
connect {
sidecar_service {
proxy {
upstreams {
# Required
destination_name = "gitea-frontend"
local_bind_port = "3000"
# Optional
local_bind_address = "127.0.0.1"
}
}
}
}
}
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:..."
]
}
2021-06-18 10:33:46 +00:00
# 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"
}
}
}
}