Single-node deployment doesn't benefit from S3 abstraction overhead; LocalFileClient keeps the same interface DocumentService depends on, backed by a STORAGE_DIR volume mount instead of a separate Garage service.
28 lines
541 B
Python
28 lines
541 B
Python
import logging
|
|
|
|
from fastapi import FastAPI
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
|
|
from app.config import settings
|
|
from app.routers import documents, search
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
app = FastAPI(title="DocHub API")
|
|
|
|
app.add_middleware(
|
|
CORSMiddleware,
|
|
allow_origins=settings.cors_origins,
|
|
allow_credentials=True,
|
|
allow_methods=["*"],
|
|
allow_headers=["*"],
|
|
)
|
|
|
|
app.include_router(documents.router)
|
|
app.include_router(search.router)
|
|
|
|
|
|
@app.get("/health")
|
|
def health():
|
|
return {"status": "ok"}
|