Added example caddy file for job

This commit is contained in:
Zuma 2025-11-07 14:47:50 +01:00
parent c7aee1cfd1
commit c4246661ef

39
apps/caddy/caddy.hcl Normal file
View 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"
}
}
}
}