2022-12-07 15:35:21 +00:00
|
|
|
job "core-service" {
|
2023-01-04 09:06:06 +00:00
|
|
|
datacenters = ["neptune", "jupiter", "corrin", "bespin"]
|
2022-12-07 15:35:21 +00:00
|
|
|
type = "service"
|
|
|
|
priority = 90
|
|
|
|
|
|
|
|
group "D53" {
|
|
|
|
count = 1
|
|
|
|
|
|
|
|
task "d53" {
|
|
|
|
driver = "nix2"
|
|
|
|
|
|
|
|
config {
|
|
|
|
packages = [
|
2023-01-26 16:52:27 +00:00
|
|
|
"git+https://git.deuxfleurs.fr/lx/D53.git?ref=main&rev=86c255dfeabc60b0ef46ff78bc487c61c9548c79"
|
2022-12-07 15:35:21 +00:00
|
|
|
]
|
|
|
|
command = "d53"
|
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
|
|
|
cpu = 100
|
|
|
|
memory = 100
|
|
|
|
}
|
|
|
|
|
|
|
|
restart {
|
|
|
|
interval = "3m"
|
|
|
|
attempts = 10
|
|
|
|
delay = "15s"
|
|
|
|
mode = "delay"
|
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
|
|
|
data = "{{ key \"secrets/consul/consul-ca.crt\" }}"
|
|
|
|
destination = "etc/tricot/consul-ca.crt"
|
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
|
|
|
data = "{{ key \"secrets/consul/consul-client.crt\" }}"
|
|
|
|
destination = "etc/tricot/consul-client.crt"
|
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
|
|
|
data = "{{ key \"secrets/consul/consul-client.key\" }}"
|
|
|
|
destination = "etc/tricot/consul-client.key"
|
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
|
|
|
data = <<EOH
|
|
|
|
D53_CONSUL_HOST=https://localhost:8501
|
|
|
|
D53_CONSUL_CA_CERT=/etc/tricot/consul-ca.crt
|
|
|
|
D53_CONSUL_CLIENT_CERT=/etc/tricot/consul-client.crt
|
|
|
|
D53_CONSUL_CLIENT_KEY=/etc/tricot/consul-client.key
|
2022-12-11 20:27:16 +00:00
|
|
|
D53_PROVIDERS=deuxfleurs.org:gandi
|
2022-12-07 15:35:21 +00:00
|
|
|
D53_GANDI_API_KEY={{ key "secrets/d53/gandi_api_key" }}
|
|
|
|
D53_ALLOWED_DOMAINS=staging.deuxfleurs.org
|
|
|
|
RUST_LOG=d53=info
|
|
|
|
EOH
|
|
|
|
destination = "secrets/env"
|
|
|
|
env = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|