Shujah239 commited on
Commit
c1568d0
·
verified ·
1 Parent(s): f0029de

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -0
Dockerfile CHANGED
@@ -20,5 +20,9 @@ RUN chmod 777 /code/uploads
20
  # Expose the port
21
  EXPOSE 7860
22
 
 
 
 
 
23
  # Command to run the application
24
  CMD ["python", "app.py"]
 
20
  # Expose the port
21
  EXPOSE 7860
22
 
23
+ # Add a health check to ensure the server is running
24
+ HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
25
+ CMD curl -f http://localhost:7860/health || exit 1
26
+
27
  # Command to run the application
28
  CMD ["python", "app.py"]