add healthcheck
Build and Push Docker Images / build-and-push (push) Successful in 18s

This commit is contained in:
Bram Kelchtermans
2025-01-28 14:49:42 +01:00
parent 8214fd6f83
commit c5ea2f1065
+4
View File
@@ -16,6 +16,10 @@ async def wait_for_network_idle(page):
"""Wait until no network requests are in flight""" """Wait until no network requests are in flight"""
await page.waitForNetworkIdle(idleTime=500, timeout=30000) await page.waitForNetworkIdle(idleTime=500, timeout=30000)
@app.head("/")
async def health_check():
return {"status": "ok"}
@app.get("/") @app.get("/")
async def visit_url(url: str, x_api_key: Optional[str] = Header(None)): async def visit_url(url: str, x_api_key: Optional[str] = Header(None)):
# Validate API key # Validate API key