Add docker-compose setup for local development#41
Add docker-compose setup for local development#41sohamzope18 wants to merge 1 commit intoopensearch-project:mainfrom
Conversation
|
Changes Added docker-compose.yml at the repository root to run the full stack: OpenSearch (port 9200) OpenSearch Agent Server (port 8001) OpenSearch Dashboards (port 5601) Added a Dockerfile for building the agent server container Added .env.docker example for container environment variables Updated the README Quick Start section with instructions to run the stack using docker compose |
wrigleyDan
left a comment
There was a problem hiding this comment.
One question around the environment file handling.
I recommend relying on one environment file only if possible.
|
|
||
| 1. **Configure Environment** | ||
| ```bash | ||
| cp .env.docker .env.docker # Note: Edit this if you need to add LLM provider credentials |
There was a problem hiding this comment.
Do we need a specific env file for the Docker setup?
Couldn't we just use the example env file like this:
cp .env.example .env.docker
That way we'd only need to update one example file when introducing new variables, not two files.
There was a problem hiding this comment.
+1, and note that LLM provider credentials are needed for the agent to work
|
Hi @sohamzope18 , could you add DCO and resolve conflicts? If you click the DCO icon, it will give you steps on how you can add it for past commits. |
jiapingzeng
left a comment
There was a problem hiding this comment.
Thanks for working on this! Overall a good start, I added some comments
| EXPOSE 8001 | ||
|
|
||
| # Run the server | ||
| CMD ["uvicorn", "server.ag_ui_app:app", "--host", "0.0.0.0", "--port", "8001"] |
There was a problem hiding this comment.
can we utilize the existing run_server.py?
| opensearch: | ||
| condition: service_healthy | ||
| agent-server: | ||
| condition: service_started |
There was a problem hiding this comment.
could we also add the MCP server: https://github.com/opensearch-project/opensearch-mcp-server-py as it is required by agent server? Ok to address in another PR too.
There was a problem hiding this comment.
Note that opensearch-mcp-server-py does not have an official Docker image yet but we can start it with uv.
|
|
||
| 1. **Configure Environment** | ||
| ```bash | ||
| cp .env.docker .env.docker # Note: Edit this if you need to add LLM provider credentials |
There was a problem hiding this comment.
+1, and note that LLM provider credentials are needed for the agent to work
|
|
||
| 2. **Start the Stack** | ||
| ```bash | ||
| docker-compose up -d --build |
There was a problem hiding this comment.
I believe docker-compose is from an older version, could we use a newer version which should be docker compose (no dash): https://docs.docker.com/compose/gettingstarted/
| COPY . . | ||
|
|
||
| # Install dependencies including the server package | ||
| RUN pip install --no-cache-dir -e . |
There was a problem hiding this comment.
nit: we can use uv as the package manager: https://docs.astral.sh/uv/guides/integration/docker/
No description provided.