This commit is contained in:
2026-02-12 16:47:20 +08:00
parent 1b4f81a9bc
commit 53eb25b98e
3 changed files with 61 additions and 25 deletions

View File

@@ -6,11 +6,6 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
WORKDIR /app
# 安装系统依赖Pandoc
RUN apt-get update \
&& apt-get install -y --no-install-recommends pandoc \
&& rm -rf /var/lib/apt/lists/*
# 安装 Python 依赖
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
@@ -18,7 +13,8 @@ RUN pip install --no-cache-dir -r requirements.txt
# 拷贝代码和相关资源(包括 ref.docx、color.lua 等)
COPY . .
# 默认启动 MCP 服务
CMD ["python", "mcp_docx_server.py"]
# SSE MCP 服务默认端口
EXPOSE 8080
# 默认以 SSE 模式启动 MCP 服务器,支持远程调用
CMD ["python", "mcp_docx_server.py", "--transport", "sse", "--host", "0.0.0.0", "--port", "8080"]