mike23415 commited on
Commit
8d98053
·
verified ·
1 Parent(s): 19107b6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -0
Dockerfile CHANGED
@@ -31,4 +31,9 @@ RUN pip install --no-cache-dir --upgrade pip && \
31
  COPY app.py .
32
 
33
  EXPOSE 5000
 
 
 
 
 
34
  CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--timeout", "600", "app:app"]
 
31
  COPY app.py .
32
 
33
  EXPOSE 5000
34
+
35
+ # Add a healthcheck to monitor application status
36
+ HEALTHCHECK --interval=30s --timeout=30s --start-period=60s --retries=3 \
37
+ CMD curl -f http://localhost:5000/health || exit 1
38
+
39
  CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--timeout", "600", "app:app"]