diff --git a/Caddyfile b/Caddyfile index 4854b6f..f6a9bea 100644 --- a/Caddyfile +++ b/Caddyfile @@ -1,4 +1,13 @@ +{ + debug +} + ai-gateway.ldex.dev { + # Log all requests to stdout + log { + output stdout + } + # 1. Force CORS headers and DELETE duplicates from backend header { -Access-Control-Allow-Origin diff --git a/app/main.py b/app/main.py index 5c0ec42..3639504 100644 --- a/app/main.py +++ b/app/main.py @@ -70,6 +70,10 @@ import os async def admin_panel(): 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("/") async def root(): return FileResponse("app/static/index.html") diff --git a/docker-compose.yml b/docker-compose.yml index 0eb012d..0952bb3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,6 +4,8 @@ services: container_name: ai-gateway networks: - ai_network + environment: + - PYTHONUNBUFFERED=1 env_file: - .env restart: always