Nomad stuff
Some checks failed
Build and Deploy LifeFAQ / build-image (push) Failing after 3m10s

This commit is contained in:
Henrik Jess Nielsen
2025-10-05 16:01:55 +02:00
parent f318440572
commit 7f87efbeb7

View File

@@ -17,6 +17,7 @@ class Application:
self.app = FastAPI( lifespan = self._lifespan_event )
self._set_image_sizes()
self._setup_static_files()
self._setup_health_route()
self._include_routers()
self._include_middelware()
@@ -53,6 +54,11 @@ class Application:
self.app.include_router(route_to_web.router)
self.app.include_router( image_service.router )
def _setup_health_route(self):
@self.app.get("/health", tags=["Health"])
async def health_check():
return {"status": "ok"}
def _include_middelware(self):
self.app.add_middleware( GZipMiddleware, minimum_size = 500 )
@@ -69,10 +75,6 @@ class Application:
"""Return the FastAPI app instance."""
return self.app
@app.get("/health")
async def health(self):
return {"status": "healthy"}
application = Application()
app = application.get_app()