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():
158
158
print (f"Error in /chat endpoint: { str (e )} " )
159
159
return jsonify ({"error" : str (e ), "response" : str (e )}), 500
160
160
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
+
161
167
# Start Flask server when this script is run directly
162
168
if __name__ == '__main__' :
163
169
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ services:
19
19
" CMD" ,
20
20
" python3" ,
21
21
" -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)" ,
23
23
]
24
24
interval : 30s
25
25
timeout : 5s
You can’t perform that action at this time.
0 commit comments