Skip to content

Instantly share code, notes, and snippets.

@jampajeen
Created August 9, 2020 17:14
Show Gist options
  • Save jampajeen/cb6426c2f6bd2fdba04a5682a3e6b0a8 to your computer and use it in GitHub Desktop.
Save jampajeen/cb6426c2f6bd2fdba04a5682a3e6b0a8 to your computer and use it in GitHub Desktop.
docker-compose nats steaming cluster healthcheck
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
@agcom
Copy link

agcom commented Jun 15, 2024

The test command can be simplified; see my solution Gist.

@mat-twg
Copy link

mat-twg commented Jun 17, 2024

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