Commit 47500ce6 by sunqi02

更新IM对应

1 parent 724a2f0c
...@@ -4,5 +4,5 @@ DATABASE_URL=sqlite:///./dev.db ...@@ -4,5 +4,5 @@ DATABASE_URL=sqlite:///./dev.db
# IM 服务 # IM 服务
USE_CONSOLE_IM=false USE_CONSOLE_IM=false
IM_BASE_URL=http://im-service:80 IM_BASE_URL=http://yjy.dev.glsx.com.cn/webim
IM_API_KEY=your-api-key IM_API_KEY=
...@@ -35,12 +35,12 @@ async def lifespan(app: FastAPI): ...@@ -35,12 +35,12 @@ async def lifespan(app: FastAPI):
db = SessionLocal() db = SessionLocal()
session_service = SessionService(db) session_service = SessionService(db)
if os.getenv("USE_CONSOLE_IM", "true").lower() == "true": if os.getenv("USE_CONSOLE_IM", "false").lower() == "true":
im_service = ConsoleIMService() im_service = ConsoleIMService()
else: else:
im_service = IMService( im_service = IMService(
base_url=os.getenv("IM_BASE_URL", "http://localhost:8080"), base_url=os.getenv("IM_BASE_URL", "http://yjy.dev.glsx.com.cn/webim"),
api_key=os.getenv("IM_API_KEY", "your-api-key"), api_key=os.getenv("IM_API_KEY") or None,
) )
agent_hub_instance = AgentHub( agent_hub_instance = AgentHub(
......
...@@ -9,7 +9,7 @@ services: ...@@ -9,7 +9,7 @@ services:
required: false required: false
environment: environment:
- DATABASE_URL=${DATABASE_URL} - DATABASE_URL=${DATABASE_URL}
- IM_BASE_URL=${IM_BASE_URL} - IM_BASE_URL=${IM_BASE_URL:-http://yjy.dev.glsx.com.cn/webim}
- USE_CONSOLE_IM=${USE_CONSOLE_IM:-false} - USE_CONSOLE_IM=${USE_CONSOLE_IM:-false}
deploy: deploy:
resources: resources:
......
...@@ -15,8 +15,8 @@ services: ...@@ -15,8 +15,8 @@ services:
required: false required: false
environment: environment:
- DATABASE_URL=${DATABASE_URL:-sqlite:///./dev.db} - DATABASE_URL=${DATABASE_URL:-sqlite:///./dev.db}
- IM_BASE_URL=${IM_BASE_URL:-http://im-service:80} - IM_BASE_URL=${IM_BASE_URL:-http://yjy.dev.glsx.com.cn/webim}
- USE_CONSOLE_IM=${USE_CONSOLE_IM:-true} - USE_CONSOLE_IM=${USE_CONSOLE_IM:-false}
depends_on: depends_on:
- im-service - im-service
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!