Add Docker Compose support for local app + agent runtime#9
Closed
raoofaltaher wants to merge 1 commit into
Closed
Conversation
- add docker-compose.yml to run the Next.js app and LangGraph agent together - add Dockerfile.agent for the Python agent container - wire the app container to the agent with LANGGRAPH_DEPLOYMENT_URL=http://agent:8123 - keep root .env usage consistent with langgraph.json - update README.md with Docker Compose run instructions and corrected env setup
There was a problem hiding this comment.
Pull request overview
Adds Docker Compose-based workflow to run the Next.js frontend and LangGraph agent together, and updates the README to document the new run path.
Changes:
- Document local URLs as clickable links and add “Run with Docker Compose” instructions in the README.
- Add an agent Dockerfile to containerize the LangGraph Python agent.
- Add a
docker-compose.ymlto build/run both services with the correct inter-service URL.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| README.md | Adds Docker Compose run instructions and updates local URLs/formatting. |
| docker/Dockerfile.agent | New container build for the Python LangGraph agent + CLI runtime. |
| docker-compose.yml | New compose definition wiring app to agent via service DNS. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| EXPOSE 8123 | ||
|
|
||
| CMD ["langgraphjs", "dev", "--host", "0.0.0.0", "--port", "8123", "--no-browser"] No newline at end of file |
Comment on lines
+36
to
+42
| ```bash | ||
| # Add your OpenAI API key at the repo root | ||
| echo 'OPENAI_API_KEY=your-key' > .env | ||
|
|
||
| # Build and start the frontend + agent | ||
| docker compose up --build | ||
| ``` |
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.
Summary
This PR adds a minimal Docker Compose setup so the project can be run locally in containers with:
apponhttp://localhost:3000agentonhttp://localhost:8123It also updates the README to document the Docker flow and correct the environment setup to use the repo-root
.env.Changes
docker-compose.ymlappandagenthttp://agent:8123docker/Dockerfile.agent0.0.0.0:8123README.md.envat the repo rootdocker compose up --buildinstructionsWhy
The repo already had a Dockerfile for the frontend, but no compose setup to run the full local stack together. This closes that gap and makes it easier to try the project without running services manually.
Verification
Verified locally with:
docker compose configdocker compose builddocker compose up -dhttp://localhost:3000returned200http://localhost:8123returned200Notes
.env, matching the existingapps/agent/langgraph.jsonconfig