Move dockerfiles inside gateway/ and update main CLI script to be able to run build, up, down and logs on a local gateway server instance.

This commit is contained in:
Hemang
2025-05-14 14:21:48 +05:30
committed by Hemang Sarkar
parent 73de68e822
commit e2e004b7b1
12 changed files with 241 additions and 30 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ services:
container_name: invariant-gateway-test
build:
context: ${GATEWAY_ROOT_PATH}
dockerfile: ${GATEWAY_ROOT_PATH}/Dockerfile.gateway
dockerfile: ${GATEWAY_ROOT_PATH}/gateway/Dockerfile.gateway
depends_on:
app-api:
condition: service_healthy
@@ -2,7 +2,7 @@
import os
import time
from datetime import timedelta
from contextlib import AsyncExitStack
from typing import Any, Optional
@@ -68,7 +68,9 @@ class MCPClient:
)
self.stdio, self.write = stdio_transport
self.session = await self.exit_stack.enter_async_context(
ClientSession(self.stdio, self.write)
ClientSession(
self.stdio, self.write, read_timeout_seconds=timedelta(minutes=0.5)
)
)
await self.session.initialize()
@@ -130,5 +132,6 @@ async def run(
finally:
# Sleep for a while to allow the server to process the background tasks
# like pushing traces to the explorer
time.sleep(2)
if push_to_explorer:
time.sleep(2)
await client.cleanup()