diff options
-rw-r--r-- | cluster/staging/app/directory/deploy/directory.hcl | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/cluster/staging/app/directory/deploy/directory.hcl b/cluster/staging/app/directory/deploy/directory.hcl index 405c321..68e00d6 100644 --- a/cluster/staging/app/directory/deploy/directory.hcl +++ b/cluster/staging/app/directory/deploy/directory.hcl @@ -14,22 +14,18 @@ job "directory" { network { port "ldap_port" { static = 389 - to = 389 } } task "bottin" { - driver = "docker" + driver = "nix2" config { - image = "superboum/bottin_amd64:22" - network_mode = "host" - readonly_rootfs = true - ports = [ "ldap_port" ] - volumes = [ - "secrets/config.json:/config.json", - "secrets:/etc/bottin", + packages = [ + "git+https://git.deuxfleurs.fr/Deuxfleurs/bottin.git?ref=main&rev=9cab98d2cee386ece54b000bbdf2346da8b55eed" ] + command = "bottin" } + user = "root" # needed to bind port 389 resources { memory = 100 @@ -37,22 +33,22 @@ job "directory" { template { data = file("../config/bottin/config.json.tpl") - destination = "secrets/config.json" + destination = "config.json" } template { data = "{{ key \"secrets/consul/consul-ca.crt\" }}" - destination = "secrets/consul-ca.crt" + destination = "etc/bottin/consul-ca.crt" } template { data = "{{ key \"secrets/consul/consul-client.crt\" }}" - destination = "secrets/consul-client.crt" + destination = "etc/bottin/consul-client.crt" } template { data = "{{ key \"secrets/consul/consul-client.key\" }}" - destination = "secrets/consul-client.key" + destination = "etc/bottin/consul-client.key" } template { @@ -70,7 +66,6 @@ EOH service { tags = ["bottin"] port = "ldap_port" - address_mode = "host" name = "bottin" check { type = "tcp" |