Skip to content

feat(infra): support self-hosting with Docker Compose#91

Open
Paul Cuciureanu (pcuci) wants to merge 1 commit intolangchain-ai:mainfrom
pcuci:main
Open

feat(infra): support self-hosting with Docker Compose#91
Paul Cuciureanu (pcuci) wants to merge 1 commit intolangchain-ai:mainfrom
pcuci:main

Conversation

@pcuci

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

Paul Cuciureanu (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
Contributor

Paul Cuciureanu (@pcuci) ty! i asked a few folks on our side. cc: Sydney Runkle (@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.

3 participants