kevin.yang 4 дней назад
Родитель
Сommit
252b24c957
3 измененных файлов с 28 добавлено и 8 удалено
  1. 26 6
      docker-compose.yml
  2. 0 2
      docker/Dockerfile.server
  3. 2 0
      requirements.txt

+ 26 - 6
docker-compose.yml

@@ -18,15 +18,36 @@ services:
     networks:
     networks:
       - agent
       - agent
 
 
-  gateway:
+  server:
     build:
     build:
       context: .
       context: .
-      dockerfile: docker/Dockerfile.gateway
-    image: agent/gateway:latest
+      dockerfile: docker/Dockerfile.server
+    image: agent/server:latest
+    profiles:
+      - build-only
+
+  api:
+    image: agent/server:latest
+    container_name: agent-api
+    restart: unless-stopped
+    env_file:
+      - .env
+    ports:
+      - "8001:8000"
+    entrypoint: "python /app/api_server.py"
+    networks:
+      - agent
+
+  gateway:
+    image: agent/server:latest
     container_name: agent-gateway
     container_name: agent-gateway
     restart: unless-stopped
     restart: unless-stopped
     env_file:
     env_file:
       - .env
       - .env
+    environment:
+      - FEISHU_HTTP_BASE_URL=http://feishu:4380
+      - CHANNELS_DISPATCH_REACTIONS=false
+      - CHANNELS_DISPATCH_CARD_ACTIONS=false
     volumes:
     volumes:
       # workspace 与 shared 数据卷
       # workspace 与 shared 数据卷
       - workspace_root:/root/.gateway/workspaces
       - workspace_root:/root/.gateway/workspaces
@@ -34,7 +55,8 @@ services:
       # 将宿主机的 docker.sock 暴露给 gateway,用于创建 workspace 容器
       # 将宿主机的 docker.sock 暴露给 gateway,用于创建 workspace 容器
       - /var/run/docker.sock:/var/run/docker.sock:ro
       - /var/run/docker.sock:/var/run/docker.sock:ro
     ports:
     ports:
-      - "8000:8000"
+      - "8002:8000"
+    entrypoint: "python /app/gateway_server.py"
     networks:
     networks:
       - agent
       - agent
 
 
@@ -45,8 +67,6 @@ services:
     image: agent/workspace:latest
     image: agent/workspace:latest
     profiles:
     profiles:
       - build-only
       - build-only
-    networks:
-      - agent
 
 
 volumes:
 volumes:
   workspace_root:
   workspace_root:

+ 0 - 2
docker/Dockerfile.gateway → docker/Dockerfile.server

@@ -8,5 +8,3 @@ RUN pip config set global.index-url https://mirrors.ustc.edu.cn/pypi/simple \
     && pip install -r requirements.txt --no-cache-dir
     && pip install -r requirements.txt --no-cache-dir
 
 
 EXPOSE 8000
 EXPOSE 8000
-
-CMD [ "python", "/app/gateway_server.py" ]

+ 2 - 0
requirements.txt

@@ -7,6 +7,8 @@ python-dotenv>=1.0.0
 # 或使用: pip install browser-use
 # 或使用: pip install browser-use
 browser-use>=0.11.0
 browser-use>=0.11.0
 langchain_core>=0.3.0
 langchain_core>=0.3.0
+pymysql==1.1.2
+dbutils==3.1.2
 
 
 # API Server (Step Tree Visualization)
 # API Server (Step Tree Visualization)
 fastapi>=0.115.0
 fastapi>=0.115.0