lenson78 commited on
Commit
cd7ab09
·
verified ·
1 Parent(s): e7f68b4

fix: add HEALTHCHECK for HF Spaces status detection

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -0
Dockerfile CHANGED
@@ -88,4 +88,7 @@ ENV PYTHONUNBUFFERED=1
88
 
89
  EXPOSE 7860
90
 
 
 
 
91
  ENTRYPOINT ["/usr/local/bin/setup.sh"]
 
88
 
89
  EXPOSE 7860
90
 
91
+ HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
92
+ CMD curl -f http://localhost:7860/ || exit 1
93
+
94
  ENTRYPOINT ["/usr/local/bin/setup.sh"]