diff --git a/cluster/staging/app/core/deploy/core-service.hcl b/cluster/staging/app/core/deploy/core-service.hcl new file mode 100644 index 0000000..3f4b343 --- /dev/null +++ b/cluster/staging/app/core/deploy/core-service.hcl @@ -0,0 +1,62 @@ +job "core-service" { + datacenters = ["neptune"] + type = "service" + priority = 90 + + group "D53" { + count = 1 + + task "d53" { + driver = "nix2" + + config { + packages = [ + "git+https://git.deuxfleurs.fr/lx/D53.git?ref=main&rev=ed2653ae7dba9c072dcca1aed03b7cda0d910c85" + ] + 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 = <