Aliashraf commited on
Commit
d620bf3
·
verified ·
1 Parent(s): f767978

Update dockerfile

Browse files
Files changed (1) hide show
  1. dockerfile +5 -5
dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM python:3.10-slim
2
 
3
  # Install system dependencies for faiss-cpu and pypdf
4
  RUN apt-get update && apt-get install -y \
@@ -21,9 +21,9 @@ COPY app.py .
21
  # Expose port 8000
22
  EXPOSE 8000
23
 
24
- # Health check with increased timeout and start period
25
- HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
26
  CMD curl -f http://localhost:8000/health || exit 1
27
 
28
- # Run gunicorn with FastAPI, simplified command
29
- CMD ["gunicorn", "-k", "uvicorn.workers.UvicornWorker", "app:app", "--bind", "0.0.0.0:8000", "--workers", "2", "--timeout", "120", "--log-level", "info"]
 
1
+ FROM python
2
 
3
  # Install system dependencies for faiss-cpu and pypdf
4
  RUN apt-get update && apt-get install -y \
 
21
  # Expose port 8000
22
  EXPOSE 8000
23
 
24
+ # Health check with extended timeouts
25
+ HEALTHCHECK --interval=30s --timeout=15s --start-period=60s --retries=3 \
26
  CMD curl -f http://localhost:8000/health || exit 1
27
 
28
+ # Run uvicorn directly
29
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1", "--log-level", "info"]