Replaced Caddy by Tricot <3

This commit is contained in:
Zuma 2025-11-22 17:50:04 +01:00
parent cf525ce1ed
commit 288f895b84
4 changed files with 98 additions and 59 deletions

95
apps/tricot/tricot.hcl Normal file
View file

@ -0,0 +1,95 @@
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"
}
}
}
}