feat: add health check endpoint for docker#304
feat: add health check endpoint for docker#304its-me-abhishek merged 1 commit intoCCExtractor:mainfrom
Conversation
|
Thank you for opening this PR! Before a maintainer takes a look, it would be really helpful if you could walk through your changes using GitHub's review tools. Please take a moment to:
More information on how to conduct a self review: This helps make the review process smoother and gives us a clearer understanding of your thought process. Once you've added your self-review, we'll continue from our side. Thank you! |
Hell1213
left a comment
There was a problem hiding this comment.
Fixed Docker health check failures by implementing the missing /health endpoint. Added proper handler with JSON response and comprehensive test coverage.
The implementation addresses the core issue - Docker containers can now properly monitor backend health status instead of getting 404 errors.
|
@its-me-abhishek ,PR is ready plss have a look at implementation . |
| @@ -0,0 +1,20 @@ | |||
| package controllers | |||
There was a problem hiding this comment.
Please rename this file, functions to HealthCheck instead of just Health
There was a problem hiding this comment.
thanks , now we have proper healthCheck file name and function instead health plss check !
Implements /health endpoint for Docker health checks and monitoring. Fixes missing health endpoint referenced in docker-compose.yml. Renamed functions to HealthCheck as requested by reviewer.
50110a2 to
c581457
Compare
Implements /health endpoint for Docker health checks and monitoring. Fixes missing health endpoint referenced in docker-compose.yml.
Description
Adds missing /health endpoint that was referenced in docker-compose.yml but not implemented. Docker health checks were failing with 404 errors, preventing proper container monitoring and orchestration.
Checklist
npx prettier --write .(for formatting)gofmt -w .(for Go backend)npm test(for JS/TS testing)Additional Notes
Created
backend/controllers/health.gowith proper JSON response and method validation. Added comprehensive tests inbackend/controllers/health_test.gocovering both success and error cases. Registered endpoint in main.go without rate limiting as health checks need fast response times.