DVampire commited on
Commit
36a31d0
·
1 Parent(s): ea729ec

update index

Browse files
Files changed (2) hide show
  1. Dockerfile +0 -4
  2. app.py +1 -7
Dockerfile CHANGED
@@ -25,9 +25,5 @@ COPY --chown=user . /app
25
  # Expose port (Hugging Face Spaces uses 7860)
26
  EXPOSE 7860
27
 
28
- # Health check
29
- HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
30
- CMD curl -f http://localhost:7860/api/health || exit 1
31
-
32
  # Run the application
33
  CMD ["python", "app.py"]
 
25
  # Expose port (Hugging Face Spaces uses 7860)
26
  EXPOSE 7860
27
 
 
 
 
 
28
  # Run the application
29
  CMD ["python", "app.py"]
app.py CHANGED
@@ -667,12 +667,6 @@ def clear_cache() -> Dict[str, str]:
667
  return {"message": "Cache cleared successfully"}
668
 
669
 
670
- @app.get("/api/health")
671
- def health_check() -> Dict[str, str]:
672
- """Health check endpoint for Hugging Face Spaces"""
673
- return {"status": "healthy", "message": "Paper Index API is running"}
674
-
675
-
676
  @app.post("/api/cache/refresh/{date_str}")
677
  async def refresh_cache(date_str: str) -> Dict[str, Any]:
678
  """Force refresh cache for a specific date"""
@@ -738,6 +732,6 @@ if __name__ == "__main__":
738
  app.mount("/", StaticFiles(directory=config.frontend_path, html=True), name="static")
739
  logger.info(f"| Frontend initialized at: {config.frontend_path}")
740
 
741
- # Use port 7860 for Hugging Face Spaces, fallback to 8000 for local development
742
  port = int(os.environ.get("PORT", 7860))
743
  uvicorn.run(app, host="0.0.0.0", port=port)
 
667
  return {"message": "Cache cleared successfully"}
668
 
669
 
 
 
 
 
 
 
670
  @app.post("/api/cache/refresh/{date_str}")
671
  async def refresh_cache(date_str: str) -> Dict[str, Any]:
672
  """Force refresh cache for a specific date"""
 
732
  app.mount("/", StaticFiles(directory=config.frontend_path, html=True), name="static")
733
  logger.info(f"| Frontend initialized at: {config.frontend_path}")
734
 
735
+ # Use port 7860 for Hugging Face Spaces, fallback to 7860 for local development
736
  port = int(os.environ.get("PORT", 7860))
737
  uvicorn.run(app, host="0.0.0.0", port=port)