job "lldap" { datacenters = ["dc1"] type = "service" priority = 80 update { auto_revert = true } group "lldap" { network { mode = "bridge" port "web" { %{~ if use_wesher ~} host_network = "wesher" %{~ endif ~} } port "ldap" { %{~ if use_wesher ~} host_network = "wesher" %{~ endif ~} } port "tls" {} } service { name = "lldap" provider = "nomad" port = "ldap" } service { name = "lldap-tls" provider = "nomad" port = "tls" } service { name = "ldap-admin" provider = "nomad" port = "web" tags = [ "traefik.enable=true", "traefik.http.routers.ldap-admin.entryPoints=websecure", ] } task "lldap" { driver = "docker" config { image = "ghcr.io/lldap/lldap:v0.5" ports = ["ldap", "web"] args = ["run", "--config-file", "$${NOMAD_TASK_DIR}/lldap_config.toml"] } env = { "LLDAP_VERBOSE" = "true" "LLDAP_LDAP_PORT" = "$${NOMAD_PORT_ldap}" "LLDAP_HTTP_PORT" = "$${NOMAD_PORT_web}" "LLDAP_DATABASE_URL_FILE" = "$${NOMAD_SECRETS_DIR}/database_url.txt" "LLDAP_KEY_SEED_FILE" = "$${NOMAD_SECRETS_DIR}/key_seed.txt" "LLDAP_JWT_SECRET_FILE" = "$${NOMAD_SECRETS_DIR}/jwt_secret.txt" "LLDAP_USER_PASS_FILE" = "$${NOMAD_SECRETS_DIR}/user_pass.txt" "LLDAP_SMTP_OPTIONS__PASSWORD_FILE" = "$${NOMAD_SECRETS_DIR}/smtp_password.txt" } template { data = <