39 lines
701 B
HCL
39 lines
701 B
HCL
job "caddy" {
|
|
datacenters = [ "gribse-house", "zuma-house", "mayel-house" ]
|
|
type = "system"
|
|
priority = 90
|
|
|
|
group "caddy" {
|
|
network {
|
|
port "http_port" { static = 80 }
|
|
port "https_port" { static = 443 }
|
|
}
|
|
|
|
task "server" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "caddy"
|
|
network_mode = "host"
|
|
ports = [ "http_port", "https_port" ]
|
|
}
|
|
|
|
resources {
|
|
cpu = 1000
|
|
memory = 400
|
|
}
|
|
|
|
service {
|
|
name = "caddy-http"
|
|
port = "http_port"
|
|
address_mode = "host"
|
|
}
|
|
|
|
service {
|
|
name = "caddy-https"
|
|
port = "https_port"
|
|
address_mode = "host"
|
|
}
|
|
}
|
|
}
|
|
}
|