cluster/infrastructure/website/nomad.hcl
Magic_RB c0fbadd95b
Update website
Signed-off-by: Magic_RB <magic_rb@redalder.org>
2021-07-25 11:31:08 +02:00

65 lines
806 B
HCL

job "website" {
datacenters = [ "homelab-1" ]
type = "service"
constraint {
attribute = "${attr.unique.hostname}"
value = "blowhole"
}
group "website" {
count = 2
update {
max_parallel = 1
}
network {
mode = "bridge"
}
service {
name = "website"
port = "80"
check {
type = "http"
address_mode = "alloc"
path = "/"
port = "80"
interval = "10s"
timeout = "10s"
}
connect {
sidecar_service {}
sidecar_task {
resources {
cpu = 75
memory = 48
}
config {
memory_hard_limit = 96
}
}
}
}
task "apache" {
driver = "docker"
config {
image = "nixng-website:local"
memory_hard_limit = 64
}
resources {
cpu = 128
memory = 32
}
}
}
}