A cloud-native LDAP server backed by a Consul datastore
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.1 KiB

  1. job "directory" {
  2. datacenters = ["dc1"]
  3. type = "service"
  4. constraint {
  5. attribute = "${attr.cpu.arch}"
  6. value = "amd64"
  7. }
  8. group "ldap" {
  9. count = 2
  10. task "server" {
  11. driver = "docker"
  12. config {
  13. image = "lxpz/bottin_amd64:14"
  14. readonly_rootfs = true
  15. port_map {
  16. ldap_port = 389
  17. }
  18. volumes = [
  19. "secrets/config.json:/config.json"
  20. ]
  21. }
  22. template {
  23. data = "{{ key \"configuration/directory/bottin/config.json\" }}"
  24. destination = "secrets/config.json"
  25. }
  26. resources {
  27. memory = 100
  28. network {
  29. port "ldap_port" {
  30. static = "389"
  31. }
  32. }
  33. }
  34. service {
  35. tags = ["bottin"]
  36. port = "ldap_port"
  37. address_mode = "host"
  38. name = "bottin"
  39. check {
  40. type = "tcp"
  41. port = "ldap_port"
  42. interval = "60s"
  43. timeout = "5s"
  44. check_restart {
  45. limit = 3
  46. grace = "90s"
  47. ignore_warnings = false
  48. }
  49. }
  50. }
  51. }
  52. }
  53. }