Created
August 9, 2020 17:14
-
-
Save jampajeen/cb6426c2f6bd2fdba04a5682a3e6b0a8 to your computer and use it in GitHub Desktop.
docker-compose nats steaming cluster healthcheck
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
healthcheck: | |
test: echo $$(wget --server-response http://node1:8222/varz 2>&1 | grep '200 OK') | grep '200' || exit 1 | |
interval: 20s | |
timeout: 5s | |
retries: 5 | |
start_period: 40s |
maybe this endpoint http://localhost:8222/healthz
?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The test command can be simplified; see my solution Gist.