diff --git a/doppelgaenger-websocket/main.py b/doppelgaenger-websocket/main.py index 0f4e74c..b5de59c 100644 --- a/doppelgaenger-websocket/main.py +++ b/doppelgaenger-websocket/main.py @@ -9,6 +9,9 @@ from dotenv import load_dotenv from logzero import logger from bson import json_util +from healthcheck import TornadoHandler, HealthCheck + +health = HealthCheck() class ChangesHandler(tornado.websocket.WebSocketHandler): @@ -75,6 +78,10 @@ def main(): app = tornado.web.Application( [ (r"/socket", ChangesHandler), + ( + "/health", + TornadoHandler, dict(checker=health) + ), ( r"/(.*)", tornado.web.StaticFileHandler, {"path": "templates/", "default_filename": "index.html"} diff --git a/doppelgaenger-websocket/requirements.txt b/doppelgaenger-websocket/requirements.txt index 86c9a88..832a260 100644 --- a/doppelgaenger-websocket/requirements.txt +++ b/doppelgaenger-websocket/requirements.txt @@ -4,3 +4,4 @@ dnspython logzero python-dotenv bson +py-healthcheck