feat: add agent-worker compose service for image build + fix port range

This commit is contained in:
¨NW¨
2026-04-11 02:25:09 +01:00
parent 3c8f13d41f
commit 9170081f96
2 changed files with 13 additions and 1 deletions

View File

@@ -182,3 +182,15 @@ services:
timeout: 5s
retries: 3
start_period: 20s
# ── Agent Worker (build-only, not started by default) ─────────────────────
# This service is used to build the agent-worker Docker image.
# Agent containers are created dynamically via `docker run` from the
# control-center when a user deploys an agent.
# Build: docker compose build agent-worker
agent-worker:
build:
context: ..
dockerfile: docker/Dockerfile.agent-worker
image: goclaw-agent-worker:latest
# Not started by default — only used for building the image

View File

@@ -409,7 +409,7 @@ export async function deployAgentContainer(agentId: number): Promise<{
};
const containerName = `goclaw-agent-${agentId}`;
const servicePort = 8001 + ((agentId - 1) % 999);
const servicePort = 8100 + ((agentId - 1) % 900); // Ports 8100-8999
const containerImage =
(agent as any).containerImage || "goclaw-agent-worker:latest";