feat: add agent-worker compose service for image build + fix port range
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user