[GH-ISSUE #312] Feature request: Healthcheck #119

Closed
opened 2026-02-27 08:15:21 +03:00 by kerem · 1 comment
Owner

Originally created by @kaysond on GitHub (Oct 4, 2022).
Original GitHub issue: https://github.com/lldap/lldap/issues/312

It would be great if the Dockerfile included a healthcheck. It should probably check both the ldap port and the web ui port. Web UI could be checked with wget --spider (included by default on the alpine builds, but debian seems to not have it).

For the ldap port, though, it seems a bit more complicated. From what I can tell debian has ldap-client via the ldap-utils package, but alpine does not.

Maybe the best way to do this is to write a custom healthcheck binary that checks both the web url and also does an ldap query?

Originally created by @kaysond on GitHub (Oct 4, 2022). Original GitHub issue: https://github.com/lldap/lldap/issues/312 It would be great if the Dockerfile included a [healthcheck](https://docs.docker.com/engine/reference/builder/#healthcheck). It should probably check both the ldap port and the web ui port. Web UI could be checked with `wget --spider` (included by default on the alpine builds, but debian seems to not have it). For the ldap port, though, it seems a bit more complicated. From what I can tell debian has `ldap-client` via the `ldap-utils` package, but alpine does not. Maybe the best way to do this is to write a custom healthcheck binary that checks both the web url and also does an ldap query?
kerem 2026-02-27 08:15:21 +03:00
Author
Owner

@nitnelave commented on GitHub (Oct 4, 2022):

The main non-trivial issue I see here is how to get the right port for the web/ldap/ldaps endpoints.

The easiest way is probably to either:

  • Extract the configuration into a separate crate, and create a new binary that loads the config the same way.
    • Probably cleaner, and lets the compiler parallelize and cache better. This would probably come as part of a bigger crate-splitting effort.
  • Extend the main binary to add a new subcommand that will run the healthcheck.
    • This will make the binary bigger than necessary, including potentially adding more dependencies (e.g. ldap client? though we can probably do without).
    • One possibility is to hide that behind a feature flag that gets built into the docker binary but not the command-line one?
    • Is it worth it? Is the binary size increase that big? Probably not, let's start simple.
<!-- gh-comment-id:1266605781 --> @nitnelave commented on GitHub (Oct 4, 2022): The main non-trivial issue I see here is how to get the right port for the web/ldap/ldaps endpoints. The easiest way is probably to either: - Extract the configuration into a separate crate, and create a new binary that loads the config the same way. - Probably cleaner, and lets the compiler parallelize and cache better. This would probably come as part of a bigger crate-splitting effort. - Extend the main binary to add a new subcommand that will run the healthcheck. - This will make the binary bigger than necessary, including potentially adding more dependencies (e.g. ldap client? though we can probably do without). - One possibility is to hide that behind a feature flag that gets built into the docker binary but not the command-line one? - Is it worth it? Is the binary size increase that big? Probably not, let's start simple.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/lldap-lldap#119
No description provided.