Feat/frontend container health probe#337
Conversation
imDarshanGK
left a comment
There was a problem hiding this comment.
Thanks for the PR. The intent (adding a frontend container health probe) is clear, but the current changes don’t match the scope.
Issues found:
- Changes in
db_service.pyare unrelated to frontend health checks and include a significant refactor of DB connection handling docker-compose.ymlhealthcheck is not clearly tied to the frontend service- The PR includes backend test changes that are unrelated to the stated goal
Could you please:
- revert unrelated backend DB changes
- add a proper frontend healthcheck (e.g. container
/healthendpoint or HTTP check on frontend service) - keep the PR focused strictly on frontend container health probe
Once scoped correctly, I can review and merge
|
@Aharshi3614 is attempting to deploy a commit to the Darshan's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Cleaned up the PR — reverted all unrelated backend DB changes and removed the test file. The PR now contains only the frontend healthcheck in docker-compose.yml: -healthcheck uses wget (available in Nginx Alpine by default) |
db3b962 to
50e708a
Compare
|
@Aharshi3614 Please properly scope the healthcheck to the frontend service and ensure it correctly verifies frontend availability before re-requesting review. |
|
Hi @imDarshanGK! Updated the healthcheck to use CMD-SHELL with explicit || exit 1 to properly verify frontend Nginx availability. The check is now strictly scoped to the frontend service on port 80. |
What this does
Adds a
healthcheckto thefrontendservice indocker-compose.yml.Related Issue
Closes #315
Why this matters
The backend already had a healthcheck configured, but the frontend container
had none. Without a health probe, Docker has no way to know if the frontend
build is actually serving content or silently failing.
Change
Added healthcheck to the frontend service using
wgetto probe the Nginxserver on port 80:
interval: 30s— checks every 30 secondstimeout: 10s— fails if no response within 10 secondsretries: 3— marks unhealthy after 3 consecutive failuresstart_period: 10s— gives container 10s to start before checks beginWhy
wgetinstead ofcurl?The frontend uses an Nginx Alpine image which includes
wgetby defaultbut may not have
curlinstalled — keeping it consistent with the base image