Fix ROOT_PATH-aware health check and improve local deployment docs#186
Merged
Conversation
added 2 commits
June 4, 2026 14:01
…oy docs
The container health check was hardcoded to http://localhost/health through
nginx. When ROOT_PATH is set, nginx serves the API under ${ROOT_PATH}/, so
that path returned 404 and the container stayed unhealthy even though the API
worked. Both the docker-compose.yml and Dockerfile.allinone health checks now
probe uvicorn directly at http://localhost:8000/health, independent of nginx
and ROOT_PATH.
Also fix onboarding documentation: replace the broken METRICS_ENDPOINT
placeholder in example.env with the real default URL, clarify that CKAN_URL/
CKAN_API_KEY stay empty on the MongoDB backend, and steer the README away from
--profile full toward targeted profiles, warning that the pelican/full
profiles need extra setup and will restart-loop on a fresh machine.
Closes #185
After pulling new code, `docker compose up` reuses the previously built image, so users can unknowingly keep running an old version. Document the explicit rebuild step and how to confirm the running version (and how to spot a stale pre-nginx image from the docker ps COMMAND column).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #185
Summary
Onboarding a new deployer surfaced one real bug and several documentation gaps that made a working installation look broken. This PR fixes all of them.
The health check bug (most impactful)
The container health check was hardcoded to
http://localhost/health, which goes through nginx. WhenROOT_PATHis set (e.g./ep-api), nginx serves the API under${ROOT_PATH}/, sohttp://localhost/healthreturns 404 and the container is reportedunhealthyindefinitely even though the API is fully functional.Verified on a live container running with
ROOT_PATH=/ep-api:localhost/health(via nginx, what the check used) →404localhost:8000/health(uvicorn directly) →200Both health checks now probe uvicorn directly at
http://localhost:8000/health, which is independent of nginx andROOT_PATHand correctly reflects API liveness:docker-compose.ymlDockerfile.allinoneDocumentation fixes
example.env: replace the brokenMETRICS_ENDPOINTplaceholder (NDP_FEDERATION_METRICS_ENDPOINT default to federation/test) with the real default collector URL, so copying the file verbatim yields a valid config.example.env: clarify thatCKAN_URL/CKAN_API_KEYstay empty on the MongoDB backend, and thatCKAN_LOCAL_ENABLEDis the master "allow local catalog writes" switch for any backend — not a "use CKAN" flag.README.md: recommend starting only the profiles you need, and warn that thepelican/fullprofiles start the Pelican federation services, which need extra TLS/federation setup and will restart-loop on a fresh local machine. Added a "recommended local stack" example that excludes Pelican.Version
Bumped to
0.32.1(swagger_settings.py+CHANGELOG.md).Testing
ROOT_PATH=/ep-api) that the new health-check commandcurl -f http://localhost:8000/healthreturns HTTP 200 / exit 0, while the oldhttp://localhost/healthreturned 404.