Skip to content

Add docker-compose setup for local development#41

Open
sohamzope18 wants to merge 1 commit intoopensearch-project:mainfrom
sohamzope18:feature/amazing-feature
Open

Add docker-compose setup for local development#41
sohamzope18 wants to merge 1 commit intoopensearch-project:mainfrom
sohamzope18:feature/amazing-feature

Conversation

@sohamzope18
Copy link

No description provided.

@sohamzope18
Copy link
Author

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

Copy link
Collaborator

@wrigleyDan wrigleyDan left a comment

Choose a reason for hiding this comment

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

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
Copy link
Collaborator

Choose a reason for hiding this comment

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

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.

Copy link
Collaborator

@jiapingzeng jiapingzeng Mar 23, 2026

Choose a reason for hiding this comment

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

+1, and note that LLM provider credentials are needed for the agent to work

@jiapingzeng
Copy link
Collaborator

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.

Copy link
Collaborator

@jiapingzeng jiapingzeng left a comment

Choose a reason for hiding this comment

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

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"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we utilize the existing run_server.py?

opensearch:
condition: service_healthy
agent-server:
condition: service_started
Copy link
Collaborator

Choose a reason for hiding this comment

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

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.

Copy link
Collaborator

Choose a reason for hiding this comment

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

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
Copy link
Collaborator

@jiapingzeng jiapingzeng Mar 23, 2026

Choose a reason for hiding this comment

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

+1, and note that LLM provider credentials are needed for the agent to work


2. **Start the Stack**
```bash
docker-compose up -d --build
Copy link
Collaborator

Choose a reason for hiding this comment

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

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 .
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: we can use uv as the package manager: https://docs.astral.sh/uv/guides/integration/docker/

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