local-deep-researcher icon indicating copy to clipboard operation
local-deep-researcher copied to clipboard

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

Open pcuci opened this issue 7 months ago • 2 comments

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.

pcuci avatar Apr 21 '25 15:04 pcuci

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

pcuci avatar Apr 21 '25 15:04 pcuci

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

rlancemartin avatar Aug 06 '25 23:08 rlancemartin