Skip to content

Commit

Permalink
fix: missing pgvector in CLI (#3165)
Browse files Browse the repository at this point in the history
Fixes #3164
  • Loading branch information
dqbd authored Jan 25, 2025
2 parents 5b11683 + 4b5b309 commit e13a8bc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion libs/cli/langgraph_cli/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,14 @@ def compose_as_dict(
# Add Postgres service before langgraph-api if it is needed
if include_db:
services["langgraph-postgres"] = {
"image": "postgres:16",
"image": "pgvector/pgvector:pg16",
"ports": ['"5433:5432"'],
"environment": {
"POSTGRES_DB": "postgres",
"POSTGRES_USER": "postgres",
"POSTGRES_PASSWORD": "postgres",
},
"command": ["postgres", "-c", "shared_preload_libraries=vector"],
"volumes": ["langgraph-data:/var/lib/postgresql/data"],
"healthcheck": {
"test": "pg_isready -U postgres",
Expand Down
2 changes: 1 addition & 1 deletion libs/cli/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langgraph-cli"
version = "0.1.68"
version = "0.1.69"
description = "CLI for interacting with LangGraph API"
authors = []
license = "MIT"
Expand Down
6 changes: 5 additions & 1 deletion libs/cli/tests/unit_tests/cli/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,17 @@ def test_prepare_args_and_stdin() -> None:
timeout: 1s
retries: 5
langgraph-postgres:
image: postgres:16
image: pgvector/pgvector:pg16
ports:
- "5433:5432"
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
command:
- postgres
- -c
- shared_preload_libraries=vector
volumes:
- langgraph-data:/var/lib/postgresql/data
healthcheck:
Expand Down
6 changes: 5 additions & 1 deletion libs/cli/tests/unit_tests/test_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,17 @@ def test_compose_with_debugger_and_default_db():
timeout: 1s
retries: 5
langgraph-postgres:
image: postgres:16
image: pgvector/pgvector:pg16
ports:
- "5433:5432"
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
command:
- postgres
- -c
- shared_preload_libraries=vector
volumes:
- langgraph-data:/var/lib/postgresql/data
healthcheck:
Expand Down

0 comments on commit e13a8bc

Please sign in to comment.