job "directory" { datacenters = ["dc1", "neptune"] type = "service" priority = 90 constraint { attribute = "${attr.cpu.arch}" value = "amd64" } group "bottin" { count = 1 network { port "ldap_port" { static = 389 to = 389 } } task "bottin" { driver = "docker" config { image = "superboum/bottin_amd64:22" network_mode = "host" readonly_rootfs = true ports = [ "ldap_port" ] volumes = [ "secrets/config.json:/config.json", "secrets:/etc/bottin", ] } resources { memory = 100 } template { data = file("../config/bottin/config.json.tpl") destination = "secrets/config.json" } template { data = "{{ key \"secrets/consul/consul-ca.crt\" }}" destination = "secrets/consul-ca.crt" } template { data = "{{ key \"secrets/consul/consul-client.crt\" }}" destination = "secrets/consul-client.crt" } template { data = "{{ key \"secrets/consul/consul-client.key\" }}" destination = "secrets/consul-client.key" } template { data = <