refactor(box): run Box Runtime as subprocess inside LangBot container

Remove the separate langbot_box_runtime Docker service. Box Runtime
  now always launches as a local stdio subprocess, regardless of whether
  LangBot runs in Docker or not. The WebSocket transport path is kept
  only for explicit runtime_url configuration (remote deployment).

  This simplifies deployment by eliminating cross-container path mapping
  and network hops. Box Runtime is a pure scheduling process (talks to
  Docker socket / nsjail), it does not execute user code or touch the
  filesystem, so container isolation is unnecessary — unlike Plugin
  Runtime.
This commit is contained in:
youhuanghe
2026-04-09 12:14:23 +00:00
committed by WangCham
parent a8eb6e6984
commit 2697d82286
4 changed files with 12 additions and 35 deletions

View File

@@ -4,24 +4,6 @@ version: "3"
services:
langbot_box_runtime:
image: rockchin/langbot:latest
container_name: langbot_box_runtime
command: ["uv", "run", "--no-sync", "-m", "langbot_plugin.box.server"]
volumes:
# Mount the container runtime socket from the host.
# Uncomment the one that matches your container runtime:
# - /var/run/podman/podman.sock:/var/run/podman/podman.sock # Podman
- /var/run/docker.sock:/var/run/docker.sock # Docker
- ./data/box:/workspaces
ports:
- 5410:5410
restart: on-failure
environment:
- TZ=Asia/Shanghai
networks:
- langbot_network
langbot_plugin_runtime:
image: rockchin/langbot:latest
container_name: langbot_plugin_runtime
@@ -42,6 +24,10 @@ services:
volumes:
- ./data:/app/data
- ./data/box:/workspaces
# Mount container runtime socket for Box sandbox (Docker backend).
# Uncomment the one that matches your container runtime:
# - /var/run/podman/podman.sock:/var/run/podman/podman.sock # Podman
- /var/run/docker.sock:/var/run/docker.sock # Docker
restart: on-failure
environment:
- TZ=Asia/Shanghai