mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 20:14:36 +00:00
- docker-compose: move ``langbot_box`` under compose profiles
(``box`` and ``all``) so ``docker compose up`` no longer requires
the sandbox container. Inline comment explains how to pair the
profile choice with ``box.enabled`` so the langbot service does not
thrash trying to reach a runtime that was never started
- docs/review/box-architecture.md:
- Annotate ``box.enabled`` in the config.yaml example, listing the
exact side effects (no remote/stdio connect; tools/skills/MCP
stdio off; reads still work)
- Replace the bare compose snippet with the actual profile-driven
invocation and the BOX__ENABLED pairing
- New "关闭/连接失败时的行为矩阵" section: a single table mapping
every consumer (native tools, activate/register_skill, stdio MCP,
skill list/CRUD, pipeline AI config, extensions page, dashboard)
to its disabled-state behavior, plus the legacy ``ap.box_service``
distinguisher note
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
74 lines
2.9 KiB
YAML
74 lines
2.9 KiB
YAML
# Docker Compose configuration for LangBot
|
|
# For Kubernetes deployment, see kubernetes.yaml and README_K8S.md
|
|
version: "3"
|
|
|
|
services:
|
|
|
|
langbot_plugin_runtime:
|
|
image: rockchin/langbot:latest
|
|
container_name: langbot_plugin_runtime
|
|
volumes:
|
|
- ./data/plugins:/app/data/plugins
|
|
ports:
|
|
- 5401:5401
|
|
restart: on-failure
|
|
environment:
|
|
- TZ=Asia/Shanghai
|
|
command: ["uv", "run", "--no-sync", "-m", "langbot_plugin.cli.__init__", "rt"]
|
|
networks:
|
|
- langbot_network
|
|
|
|
# The Box sandbox runtime is optional. It is only started when you run
|
|
# ``docker compose --profile box up`` (or ``docker compose --profile all
|
|
# up``). With Box off, LangBot keeps the dashboard / skills list visible
|
|
# (read-only) but disables sandbox tools, skill add/edit and stdio MCP —
|
|
# set ``box.enabled: false`` in ``data/config.yaml`` (or
|
|
# ``BOX__ENABLED=false`` in the langbot service env below) to match.
|
|
langbot_box:
|
|
image: rockchin/langbot:latest
|
|
container_name: langbot_box
|
|
profiles: ["box", "all"]
|
|
volumes:
|
|
# Keep the source and target path identical because langbot_box uses the
|
|
# host Docker socket to create sandbox containers. Override
|
|
# LANGBOT_BOX_ROOT with an absolute path if you do not want the default.
|
|
- ${LANGBOT_BOX_ROOT:-${PWD}/data/box}:${LANGBOT_BOX_ROOT:-${PWD}/data/box}
|
|
# Mount container runtime socket for Box sandbox 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
|
|
# The Box runtime does NOT read box.local.* from config.yaml or env; it
|
|
# receives its configuration from LangBot via the INIT RPC action.
|
|
# Do not add LANGBOT_BOX_* / BOX__* here — they would be silently ignored.
|
|
command: ["uv", "run", "--no-sync", "-m", "langbot_plugin.box", "--mode", "ws"]
|
|
networks:
|
|
- langbot_network
|
|
|
|
langbot:
|
|
image: rockchin/langbot:latest
|
|
container_name: langbot
|
|
volumes:
|
|
- ./data:/app/data
|
|
restart: on-failure
|
|
environment:
|
|
- TZ=Asia/Shanghai
|
|
# Unified env-override convention: SECTION__SUBSECTION__KEY overrides the
|
|
# matching config.yaml field (see LoadConfigStage). These map onto
|
|
# box.local.* and are forwarded to the Box runtime via INIT RPC.
|
|
- BOX__LOCAL__HOST_ROOT=${LANGBOT_BOX_ROOT:-${PWD}/data/box}
|
|
- BOX__LOCAL__DEFAULT_WORKSPACE=default
|
|
- BOX__LOCAL__SKILLS_ROOT=skills
|
|
- BOX__LOCAL__ALLOWED_MOUNT_ROOTS=${LANGBOT_BOX_ROOT:-${PWD}/data/box}
|
|
ports:
|
|
- 5300:5300 # For web ui and webhook callback
|
|
- 2280-2285:2280-2285 # For platform reverse connection
|
|
networks:
|
|
- langbot_network
|
|
|
|
networks:
|
|
langbot_network:
|
|
driver: bridge
|