95 lines
1.9 KiB
HCL
95 lines
1.9 KiB
HCL
job "tricot" {
|
|
datacenters = ["zuma-house", "gribse-house", "mayel-house"]
|
|
type = "system"
|
|
priority = 90
|
|
|
|
update {
|
|
max_parallel = 1
|
|
stagger = "5m"
|
|
}
|
|
|
|
group "tricot" {
|
|
network {
|
|
port "http_port" { static = 80 }
|
|
port "https_port" { static = 443 }
|
|
port "metrics_port" { static = 9334 }
|
|
}
|
|
|
|
task "server" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "git.shenanigans.cc/zuma/tricot:filouterie"
|
|
network_mode = "host"
|
|
readonly_rootfs = true
|
|
ports = [ "http_port", "https_port" ]
|
|
volumes = [
|
|
"secrets:/etc/tricot",
|
|
]
|
|
ulimit {
|
|
nofile = "65535:65535"
|
|
}
|
|
# exporting jemalloc profiles requires a
|
|
# writeable tmpfs
|
|
mount {
|
|
type = "tmpfs"
|
|
target = "/tmp"
|
|
readonly = false
|
|
}
|
|
}
|
|
|
|
resources {
|
|
cpu = 1000
|
|
memory = 400
|
|
}
|
|
|
|
restart {
|
|
interval = "5m"
|
|
attempts = 10
|
|
delay = "15s"
|
|
mode = "delay"
|
|
}
|
|
|
|
template {
|
|
data = <<EOH
|
|
TRICOT_NODE_NAME={{ env "attr.unique.hostname" }}
|
|
TRICOT_LETSENCRYPT_EMAIL=zuma@deuxfleurs.fr
|
|
TRICOT_ENABLE_COMPRESSION=true
|
|
TRICOT_CONSUL_TLS_SKIP_VERIFY=true
|
|
TRICOT_HTTP_BIND_ADDR=[::]:80
|
|
TRICOT_HTTPS_BIND_ADDR=[::]:443
|
|
TRICOT_METRICS_BIND_ADDR=[::]:9334
|
|
TRICOT_MAX_LOG_PER_SEC=10
|
|
RUST_LOG=tricot=debug
|
|
EOH
|
|
destination = "secrets/env"
|
|
env = true
|
|
}
|
|
|
|
service {
|
|
name = "tricot-http"
|
|
port = "http_port"
|
|
tags = [
|
|
"${meta.site}"
|
|
]
|
|
address_mode = "host"
|
|
}
|
|
|
|
service {
|
|
name = "tricot-https"
|
|
port = "https_port"
|
|
tags = [
|
|
"${meta.site}",
|
|
]
|
|
address_mode = "host"
|
|
}
|
|
|
|
service {
|
|
name = "tricot-metrics"
|
|
port = "metrics_port"
|
|
address_mode = "host"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|