Skip to content

Add Docker Compose support for local app + agent runtime#9

Closed
raoofaltaher wants to merge 1 commit into
CopilotKit:mainfrom
raoofaltaher:feature/docker-compose-local-run
Closed

Add Docker Compose support for local app + agent runtime#9
raoofaltaher wants to merge 1 commit into
CopilotKit:mainfrom
raoofaltaher:feature/docker-compose-local-run

Conversation

@raoofaltaher
Copy link
Copy Markdown

Summary

This PR adds a minimal Docker Compose setup so the project can be run locally in containers with:

  • app on http://localhost:3000
  • agent on http://localhost:8123

It also updates the README to document the Docker flow and correct the environment setup to use the repo-root .env.

Changes

  • added docker-compose.yml
    • starts app and agent
    • configures the app to talk to the agent at http://agent:8123
  • added docker/Dockerfile.agent
    • builds and runs the LangGraph Python agent
    • binds to 0.0.0.0:8123
  • updated README.md
    • corrected env setup to use .env at the repo root
    • added docker compose up --build instructions

Why

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 config
  • docker compose build
  • docker compose up -d
  • http://localhost:3000 returned 200
  • http://localhost:8123 returned 200

Notes

  • the agent keeps using the root .env, matching the existing apps/agent/langgraph.json config
  • startup ordering is handled by Compose, though the agent may need a brief warm-up before the first request

- 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
Copilot AI review requested due to automatic review settings March 14, 2026 13:51
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml to 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.

Comment thread docker/Dockerfile.agent

EXPOSE 8123

CMD ["langgraphjs", "dev", "--host", "0.0.0.0", "--port", "8123", "--no-browser"] No newline at end of file
Comment thread README.md
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
```
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