Skip to content

Conversation

@pcuci
Copy link

@pcuci pcuci commented Apr 21, 2025

This PR introduces a Docker Compose configuration (compose.yaml) using PostgreSQL to provide a persistent local deployment option for the Local Deep Researcher. I'm sharing it here as I had a hard time figuring out how to get it working reading the documentation, in case others want a ready-to use locally self-hosted deep researcher. 🤓

The current langgraph dev setup demonstrated in the README uses in-memory storage, which loses state on restart.

This additional Docker Compose setup enables:

  • Persistent storage of graph runs and states via PostgreSQL
  • Run resumption and state inspection across restarts.

It relies on langgraph dockerfile to generate the API server's postgres.Dockerfile from langgraph-postgres.json, ensuring reproducible builds.

I also updated the README with instructions for using this Docker Compose setup.

- Add Docker Compose setup for persistent PostgreSQL and Redis services, enabling stateful LangGraph API deployment.
- Generate  from  for reproducible builds without committing artifacts.
- Update  to exclude env files, build artifacts, and generated Dockerfile.
- Extend README with detailed Docker Compose instructions for persistent usage
@pcuci
Copy link
Author

pcuci commented Apr 21, 2025

I'm still not 100% sure I'm doing this "the right LangGraph way", given the spotty documentation on the topic

Happy to tweak this PR, if we could simplify it further!

On a second thought, perhaps committing postgres.Dockerfile might mean one only needs Docker installed to get everything rolling. I.e.: git clone followed by docker compose up -d, then hit Studio UI url https://smith.langchain.com/studio/?baseUrl=http://localhost:8100

@rlancemartin
Copy link
Collaborator

@pcuci ty! i asked a few folks on our side. cc: @sydney-runkle

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants