Made docker compose work on Mac. Fixes #519 (#574)

made docker compose work on Mac
This commit is contained in:
Denys Kurylenko 2025-06-12 19:15:39 -07:00 committed by GitHub
parent efb185e347
commit 5287810d2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View File

@ -10,6 +10,8 @@ RUN apt-get update && apt-get install -y curl && \
# Add uv to PATH
ENV PATH="/root/.local/bin:${PATH}"
ENV MCP_SERVER_HOST="0.0.0.0"
# Copy pyproject.toml and install dependencies
COPY pyproject.toml .
RUN uv sync

View File

@ -1166,6 +1166,11 @@ async def initialize_server() -> MCPConfig:
action='store_true',
help='Enable entity extraction using the predefined ENTITY_TYPES',
)
parser.add_argument(
'--host',
default=os.environ.get('MCP_SERVER_HOST'),
help='Host to bind the MCP server to (default: MCP_SERVER_HOST environment variable)',
)
args = parser.parse_args()
@ -1187,6 +1192,11 @@ async def initialize_server() -> MCPConfig:
# Initialize Graphiti
await initialize_graphiti()
if args.host:
logger.info(f'Setting MCP server host to: {args.host}')
# Set MCP server host from CLI or env
mcp.settings.host = args.host
# Return MCP configuration
return MCPConfig.from_cli(args)