RemiRigal / Plex-Auto-Languages

Automated language selection for Plex TV Shows !
MIT License
428 stars 16 forks source link

Add health checks + kubernetes liveness/readiness probes #19

Closed 0dragosh closed 2 years ago

0dragosh commented 2 years ago

It would be great to have at least one HTTP endpoint that we can use for a health check at deployment.

Could be as simple as:

@app.route('/healthz')
def live():
  return "Live!"

@app.route('/readyz')
def ready():
  return "Ready!"

after config is loaded. (example is using flask)

RemiRigal commented 2 years ago

Thank you for opening the issue, I just merged #21 that adds the health-check HTTP server.

You can use one of those endpoints:

RemiRigal commented 2 years ago

FYI I've changed the port on which the health-check server is running to 9880 in order to avoid the need for elevated privileges when running the application without Docker. This change will be included in the next release.