File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,12 @@ def chat():
158158 print (f"Error in /chat endpoint: { str (e )} " )
159159 return jsonify ({"error" : str (e ), "response" : str (e )}), 500
160160
161+ @app .get ("/health" )
162+ async def health_check ():
163+ """Health check endpoint"""
164+ return {"status" : "healthy" , "message" : "AI Library Assistant is running" }
165+
166+
161167# Start Flask server when this script is run directly
162168if __name__ == '__main__' :
163169
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ services:
1919 " CMD" ,
2020 " python3" ,
2121 " -c" ,
22- " import urllib.request; exit(0) if urllib.request.urlopen('http://localhost:5001/').status == 200 else exit(1)" ,
22+ " import urllib.request; exit(0) if urllib.request.urlopen('http://localhost:5001/health ').status == 200 else exit(1)" ,
2323 ]
2424 interval : 30s
2525 timeout : 5s
You can’t perform that action at this time.
0 commit comments