feat: update sandbox service configuration in Docker Compose files
- Added container name for the sandbox service in both docker-compose.dev.yml and docker-compose.yml. - Changed the profile from 'sandbox' to 'full' for the sandbox service, enhancing its integration within the application. - Added logging for skill availability and sandbox mode in the skill handler, improving debugging capabilities.
This commit is contained in:
@@ -97,11 +97,12 @@ services:
|
|||||||
# Sandbox 镜像:仅用于 build/pull,非常驻服务;本地 app 执行 Skills 时按需 docker run 该镜像,用毕即释
|
# Sandbox 镜像:仅用于 build/pull,非常驻服务;本地 app 执行 Skills 时按需 docker run 该镜像,用毕即释
|
||||||
sandbox:
|
sandbox:
|
||||||
image: wechatopenai/weknora-sandbox:${WEKNORA_VERSION:-latest}
|
image: wechatopenai/weknora-sandbox:${WEKNORA_VERSION:-latest}
|
||||||
|
container_name: WeKnora-sandbox-dev
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: docker/Dockerfile.sandbox
|
dockerfile: docker/Dockerfile.sandbox
|
||||||
profiles:
|
profiles:
|
||||||
- sandbox
|
- full
|
||||||
command: ["true"]
|
command: ["true"]
|
||||||
restart: "no"
|
restart: "no"
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -119,11 +119,12 @@ services:
|
|||||||
# Sandbox 镜像:仅用于 build/pull,非常驻服务;app 执行 Skills 时按需 docker run 该镜像,用毕即释
|
# Sandbox 镜像:仅用于 build/pull,非常驻服务;app 执行 Skills 时按需 docker run 该镜像,用毕即释
|
||||||
sandbox:
|
sandbox:
|
||||||
image: wechatopenai/weknora-sandbox:${WEKNORA_VERSION:-latest}
|
image: wechatopenai/weknora-sandbox:${WEKNORA_VERSION:-latest}
|
||||||
|
container_name: WeKnora-sandbox
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: docker/Dockerfile.sandbox
|
dockerfile: docker/Dockerfile.sandbox
|
||||||
profiles:
|
profiles:
|
||||||
- sandbox
|
- full
|
||||||
command: ["true"]
|
command: ["true"]
|
||||||
restart: "no"
|
restart: "no"
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ func (h *SkillHandler) ListSkills(c *gin.Context) {
|
|||||||
sandboxMode := os.Getenv("WEKNORA_SANDBOX_MODE")
|
sandboxMode := os.Getenv("WEKNORA_SANDBOX_MODE")
|
||||||
skillsAvailable := sandboxMode != "" && sandboxMode != "disabled"
|
skillsAvailable := sandboxMode != "" && sandboxMode != "disabled"
|
||||||
|
|
||||||
|
logger.Infof(ctx, "skills_available: %v, sandboxMode: %s", skillsAvailable, sandboxMode)
|
||||||
|
|
||||||
c.JSON(http.StatusOK, gin.H{
|
c.JSON(http.StatusOK, gin.H{
|
||||||
"success": true,
|
"success": true,
|
||||||
"data": response,
|
"data": response,
|
||||||
|
|||||||
Reference in New Issue
Block a user