fix: point the docker compose healthcheck at the langchain_test database - #336
Open
Mrxh (x1247897956) wants to merge 1 commit into
Open
Mrxh (x1247897956) wants to merge 1 commit into
Mrxh (x1247897956) wants to merge 1 commit into
Conversation
`POSTGRES_DB` is `langchain_test`, but the healthcheck connects to `/langchain`, which does not exist. The check therefore never passes and the container stays `starting` indefinitely (the logs fill with `FATAL: database "langchain" does not exist`), so `docker compose up --wait` never returns for anyone using this file.
This branch has not been deployed
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.
What
The
pgvectorservice healthcheck now connects tolangchain_test, matchingPOSTGRES_DB.Why
POSTGRES_DBislangchain_test, but the healthcheck runs:There is no
langchaindatabase, so the check never passes. The container stays instartingindefinitely and the logs fill with:That means
docker compose up --waitnever returns for anyone using this file, and the service never reports healthy.How tested
docker compose config→ validdocker compose down && docker compose up -d pgvector, then polleddocker inspect -f '{{.State.Health.Status}}':starting→healthyin ~9sstarting(observed for 90s+, with theFATALlog line repeating every 5s)Note
Alternatives would be
pg_isready -U langchain -d langchain_test(what CI uses) or interpolating${POSTGRES_DB}. I kept the existingpsqlform and changed only the database name to keep the diff minimal — happy to switch if you prefer one of those.