{"push_id":2984843371,"size":1,"distinct_size":1,"ref":"refs/heads/patch-1","head":"1958596d00b553db5fd195d91471639113880a7f","before":"fe84718b5569876aea30cf2a12829422efdd5524","commits":[{"sha":"1958596d00b553db5fd195d91471639113880a7f","author":{"name":"Azamat M","email":"2a481fd89534280a60f8982693a03470359b9791@users.noreply.github.com"},"message":"Update Dockerfile\n\nSince parity is built for \"mission critical use\", I thought other operators may see the need for this.\r\n\r\nAdding the `curl` and `jq` commands allows for an extremely simple health check to be usable in container orchestrators.\r\n\r\nFor example. Here is a health check for a parity docker container running in Kubernetes.\r\n\r\nThis can be setup as a readiness Probe that would prevent clustered nodes that aren't ready from serving traffic.\r\n\r\n```bash\r\n#!/bin/bash\r\n\r\nETH_SYNCING=$(curl -X POST --data '{\"jsonrpc\":\"2.0\",\"method\":\"eth_syncing\",\"params\":[],\"id\":1}' http://localhost:8545 -H 'Content-Type: application/json')\r\nRESULT=$(echo \"$ETH_SYNCING | jq -r .result)\r\n\r\nif [ \"$RESULT\" == \"false\" ]; then\r\n  echo \"Parity is ready to start accepting traffic\"\r\n  exit 0\r\nelse\r\n  echo \"Parity is still syncing the blockchain\"\r\n  exit 1\r\nfi\r\n```","distinct":true,"url":"https://api.github.com/repos/mazamats/parity-ethereum/commits/1958596d00b553db5fd195d91471639113880a7f"}]}
{"actor":{"display_login":"mazamats"}}