Spaces:
Sleeping
Sleeping
Commit ·
3625d12
1
Parent(s): b1a5b9e
added health check to the dockerfile
Browse files- Dockerfile +6 -0
Dockerfile
CHANGED
|
@@ -13,4 +13,10 @@ COPY --chown=user ./requirements.txt requirements.txt
|
|
| 13 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 14 |
|
| 15 |
COPY --chown=user . /app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 13 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 14 |
|
| 15 |
COPY --chown=user . /app
|
| 16 |
+
|
| 17 |
+
# Health check
|
| 18 |
+
HEALTHCHECK --interval=30s --timeout=10s --start-period=180s \
|
| 19 |
+
CMD curl -f http://localhost:7860/health || exit 1
|
| 20 |
+
|
| 21 |
+
|
| 22 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|