Enabled Caddy logging and added unbuffered health check
This commit is contained in:
@@ -1,4 +1,13 @@
|
|||||||
|
{
|
||||||
|
debug
|
||||||
|
}
|
||||||
|
|
||||||
ai-gateway.ldex.dev {
|
ai-gateway.ldex.dev {
|
||||||
|
# Log all requests to stdout
|
||||||
|
log {
|
||||||
|
output stdout
|
||||||
|
}
|
||||||
|
|
||||||
# 1. Force CORS headers and DELETE duplicates from backend
|
# 1. Force CORS headers and DELETE duplicates from backend
|
||||||
header {
|
header {
|
||||||
-Access-Control-Allow-Origin
|
-Access-Control-Allow-Origin
|
||||||
|
|||||||
@@ -70,6 +70,10 @@ import os
|
|||||||
async def admin_panel():
|
async def admin_panel():
|
||||||
return FileResponse("app/static/admin.html")
|
return FileResponse("app/static/admin.html")
|
||||||
|
|
||||||
|
@app.get("/api/v1/health")
|
||||||
|
async def health_check():
|
||||||
|
return {"status": "ok", "message": "Global AI Gateway is reachable"}
|
||||||
|
|
||||||
@app.get("/")
|
@app.get("/")
|
||||||
async def root():
|
async def root():
|
||||||
return FileResponse("app/static/index.html")
|
return FileResponse("app/static/index.html")
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ services:
|
|||||||
container_name: ai-gateway
|
container_name: ai-gateway
|
||||||
networks:
|
networks:
|
||||||
- ai_network
|
- ai_network
|
||||||
|
environment:
|
||||||
|
- PYTHONUNBUFFERED=1
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
restart: always
|
restart: always
|
||||||
|
|||||||
Reference in New Issue
Block a user