Removed / endpoint
Browse files- Dockerfile +4 -0
Dockerfile
CHANGED
|
@@ -22,5 +22,9 @@ COPY app ./app
|
|
| 22 |
# Expose the port your FastAPI app uses
|
| 23 |
EXPOSE 7860
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
# Run the FastAPI app
|
| 26 |
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 22 |
# Expose the port your FastAPI app uses
|
| 23 |
EXPOSE 7860
|
| 24 |
|
| 25 |
+
# Docker health check
|
| 26 |
+
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
|
| 27 |
+
CMD curl -f http://localhost:7860/health || exit 1
|
| 28 |
+
|
| 29 |
# Run the FastAPI app
|
| 30 |
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|