mirror of
https://github.com/kennethreitz/kjvstudy.org.git
synced 2026-06-05 23:00:16 +00:00
Add /health endpoint directly in nginx
Fly.io's Consul health checks hit /health. Now nginx responds directly with 200 OK without proxying to uvicorn, so health checks won't fail under heavy load. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -93,5 +93,12 @@ http {
|
||||
proxy_set_header Host $host;
|
||||
proxy_buffering off;
|
||||
}
|
||||
|
||||
# Fly.io health check - respond directly from nginx (no upstream needed)
|
||||
location = /health {
|
||||
access_log off;
|
||||
add_header Content-Type application/json;
|
||||
return 200 '{"status":"ok"}';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,5 +92,12 @@ http {
|
||||
proxy_set_header Host $host;
|
||||
proxy_buffering off;
|
||||
}
|
||||
|
||||
# Health check - respond directly from nginx (no upstream needed)
|
||||
location = /health {
|
||||
access_log off;
|
||||
add_header Content-Type application/json;
|
||||
return 200 '{"status":"ok"}';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user