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

Docker required packages to add an health check #2072

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

10undertiber
Copy link

@10undertiber 10undertiber commented Jan 13, 2024

With these extra packages is possible to add an healthcheck command using something like:

curl -s http://127.0.0.1:8080/healthcheck | jq '.MaxwellHealth.healthy' | grep -E "^true$"

Test it by using docker-compose, here an example:

mysql:
    image: mysql:latest
    environment:
      - MYSQL_ROOT_PASSWORD=root
      - MYSQL_DATABASE=test
      
maxwell:
    image: zendesk/maxwell:latest
    command: "bin/maxwell --user=root --password=root --host=mysql --http_diagnostic=true --metrics_type=http --http_port=8080"
    healthcheck:
      test: ["CMD", "curl", "-s", "http://127.0.0.1:8080/healthcheck", "|", "jq", "'.MaxwellHealth.healthy'", "|", "grep", "-E", "\"^true$\""]
      timeout: 20s
      retries: 10

…sing something like:

curl -s http://127.0.0.1:8080/healthcheck | jq '.MaxwellHealth.healthy' | grep -E "^true$"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant