mozilla/libmozevent

Support dockerflow in web server

Closed this issue · 0 comments

La0 commented

The internal web server should implement dockerflow protocol.

In libmozevent/web.py, add 3 endpoints as described in the doc:

  • Respond to /__version__ with the contents of /app/version.json
  • Respond to /__heartbeat__ with a HTTP 200 or 5xx on error. This should check backing services like a database for connectivity
  • Respond to /__lbheartbeat__ with an HTTP 200. This is for load balancer checks and should not check backing services.

Heart beat endpoints should return 200 (we do not have error management at that level).

The WebServer constructor must be updated to support a path towards the version.json file, defaulting to /app/version.json (will be used in Docker).