Skip to content

Feat/frontend container health probe#337

Open
Aharshi3614 wants to merge 5 commits into
imDarshanGK:mainfrom
Aharshi3614:feat/frontend-container-health-probe
Open

Feat/frontend container health probe#337
Aharshi3614 wants to merge 5 commits into
imDarshanGK:mainfrom
Aharshi3614:feat/frontend-container-health-probe

Conversation

@Aharshi3614
Copy link
Copy Markdown
Contributor

What this does

Adds a healthcheck to the frontend service in docker-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 wget to probe the Nginx
server on port 80:

  • interval: 30s — checks every 30 seconds
  • timeout: 10s — fails if no response within 10 seconds
  • retries: 3 — marks unhealthy after 3 consecutive failures
  • start_period: 10s — gives container 10s to start before checks begin

Why wget instead of curl?

The frontend uses an Nginx Alpine image which includes wget by default
but may not have curl installed — keeping it consistent with the base image

@imDarshanGK imDarshanGK added SSoC26 Part of Social Summer of Code 2026 Medium Feature or backend work with moderate scope labels Jun 4, 2026
Copy link
Copy Markdown
Owner

@imDarshanGK imDarshanGK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.py are unrelated to frontend health checks and include a significant refactor of DB connection handling
  • docker-compose.yml healthcheck 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 /health endpoint or HTTP check on frontend service)
  • keep the PR focused strictly on frontend container health probe

Once scoped correctly, I can review and merge

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 5, 2026

@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.

@Aharshi3614
Copy link
Copy Markdown
Contributor Author

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)
-probes http://localhost:80 every 30s
-10s timeout, 3 retries, 10s start period
-frontend depends_on backend with condition: service_healthy

@Aharshi3614 Aharshi3614 force-pushed the feat/frontend-container-health-probe branch from db3b962 to 50e708a Compare June 5, 2026 02:15
@imDarshanGK
Copy link
Copy Markdown
Owner

@Aharshi3614 Please properly scope the healthcheck to the frontend service and ensure it correctly verifies frontend availability before re-requesting review.

@Aharshi3614
Copy link
Copy Markdown
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Medium Feature or backend work with moderate scope SSoC26 Part of Social Summer of Code 2026

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a container health probe for the frontend build

2 participants