Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Healthchecks #270

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Add support for Healthchecks #270

wants to merge 4 commits into from

Conversation

fubarhouse
Copy link
Collaborator

This PR resolves #269.

This will add some nice outputs in docker ps to indicate if each container passes a given health check.
These checks are supported via official Docker API's and the PR includes all of this and testing.

  • DNSMasq: Will check that the process is actually running inside the container.
  • HAProxy: Will check if the stats route can be successfully fetched.
  • MailHog: Will check if the MailHog route can be successfully fetched.
  • SSH Agent: Will check if $SSH_AUTH_SOCK is not empty.

These checks will be run every 30 seconds, will retry 5 times in the event of a failure (2.5 minutes total), start after 5 seconds of container running and the checks will time out after 5 seconds of no response / command execution completion.

18bd6e5e1e6b        amazeeio/ssh-agent       "/run.sh ssh-agent"      23 minutes ago      Up 22 minutes (healthy)                                                amazeeio-ssh-agent
34dfa62c2fed        mailhog/mailhog          "MailHog"                23 minutes ago      Up 23 minutes (healthy)   80/tcp, 8025/tcp, 0.0.0.0:1025->1025/tcp     amazeeio-mailhog
6e2e0fb28db2        amazeeio/haproxy         "/app/docker-entrypo…"   23 minutes ago      Up 23 minutes (healthy)   0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp     amazeeio-haproxy
e16d2bcc35cc        andyshinn/dnsmasq:2.78   "dnsmasq -k -A /dock…"   23 minutes ago      Up 23 minutes (healthy)   0.0.0.0:6053->53/tcp, 0.0.0.0:6053->53/udp   amazeeio-dnsmasq

Signed-off-by: Karl Hepworth <karl.hepworth@gmail.com>
Signed-off-by: Karl Hepworth <karl.hepworth@gmail.com>
Signed-off-by: Karl Hepworth <karl.hepworth@gmail.com>
Signed-off-by: Karl Hepworth <karl.hepworth@gmail.com>
@fubarhouse fubarhouse added the inactive No work is currently planned or pursued for this task. label Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive No work is currently planned or pursued for this task.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement health checks for containers
1 participant