Support for Docker Images to Simplify Deployment with SSE/HTTP Remote Server

View original issue on GitHub  ·  Variant 3

Simplifying Deployment with Docker Images for SSE/HTTP Remote Server

The mcp-server-datahub project has seen significant improvements with the introduction of SSE/HTTP remote server support. However, deploying and managing the application can still be cumbersome, especially when building from source for each deployment. This issue proposes the introduction of official Docker image support to streamline the deployment process, improve consistency across environments, and simplify local and containerized setups.

The Problem: Manual Build and Deployment

Currently, users typically need to clone the repository, install dependencies, and configure the application manually. This process can be error-prone and time-consuming, particularly when deploying to multiple environments or when dealing with complex dependencies. Furthermore, inconsistencies between development, staging, and production environments can lead to unexpected issues.

Root Cause: Lack of Official Docker Images

The primary root cause is the absence of official, pre-built Docker images. Without these, users are forced to build the application from source, manage dependencies manually, and create their own deployment scripts. This increases the barrier to entry and adds operational overhead. As pointed out in the community discussion, the need to explicitly pass the --host argument (e.g., --host 0.0.0.0) further highlights the need for a standardized and easily configurable deployment method that Docker can provide.

Solution: Official Docker Image and Compose Configuration

The proposed solution involves creating and maintaining official Docker images for the mcp-server-datahub project. These images would include all necessary dependencies and configurations, allowing users to deploy the application with a single command. A corresponding docker-compose.yml file would provide a simple and declarative way to manage the application and its dependencies.

Here's a sample Dockerfile that could be used as a starting point:


FROM python:3.11-slim

WORKDIR /app

COPY pyproject.toml .
COPY README.md .
COPY src ./src

RUN pip install --upgrade pip \
    && pip install uv

# Install project dependencies
RUN pip install .

EXPOSE 8000

ENTRYPOINT ["uv", "run", "mcp-server-datahub", "--transport", "http", "--host", "0.0.0.0", "--debug"]

And here's a corresponding docker-compose.yml file:


services:
  mcp-server-datahub:
    build: .
    ports:
      - "8000:8000"
    env_file:
      - .env
    restart: unless-stopped

This configuration allows users to build and run the application using the following commands:


docker-compose build
docker-compose up -d

The docker-compose up -d command starts the application in detached mode, allowing it to run in the background.

Practical Tips and Considerations

By providing official Docker images, the mcp-server-datahub project can significantly improve the deployment experience for users, reduce operational overhead, and promote consistency across environments. This will ultimately lead to wider adoption and easier maintenance of the application.