Added example caddy file for job
This commit is contained in:
parent
c7aee1cfd1
commit
c4246661ef
1 changed files with 39 additions and 0 deletions
39
apps/caddy/caddy.hcl
Normal file
39
apps/caddy/caddy.hcl
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue