Update Dockerfile
Browse files- 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"]
|