Add healthcheck endpoint
This commit is contained in:
@@ -5,7 +5,7 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "8001:8001"
|
- "8001:8000"
|
||||||
environment:
|
environment:
|
||||||
PYTHONUNBUFFERED: "1"
|
PYTHONUNBUFFERED: "1"
|
||||||
APP_MODULE: "src.main:app"
|
APP_MODULE: "src.main:app"
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ class Settings(BaseSettings):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def EXCLUDED_PATHS(self) -> List[str]:
|
def EXCLUDED_PATHS(self) -> List[str]:
|
||||||
return ["/docs", "/redoc", "/openapi.json", "/ping", "/health"]
|
return ["/docs", "/redoc", "/openapi.json", "/ping", "/health", '/healthcheck']
|
||||||
|
|
||||||
|
|
||||||
@lru_cache(maxsize=1)
|
@lru_cache(maxsize=1)
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ async def ping() -> dict[str, str]:
|
|||||||
'status': 'ok',
|
'status': 'ok',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@app.get('/healthcheck')
|
||||||
@app.get('/health')
|
@app.get('/health')
|
||||||
async def health() -> dict[str, str]:
|
async def health() -> dict[str, str]:
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user