Skip to content
Agent Orchestration
Command

/deploy_to_docker

Build Docker image and start/redeploy the MCP Task Orchestrator container, reusing the last-used config by default

BOOST
From plugin
task-orchestrator
2092 skills4 agents2 commands
Install
> /plugin marketplace add jpicklyk/task-orchestrator
> /plugin install task-orchestrator@task-orchestrator-marketplace

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/deploy_to_docker

Context preview

What this command does when you run it.

Build Docker image and start/redeploy the MCP Task Orchestrator container, reusing the last-used config by default

Command definition

deploy_to_docker.md
description: Build Docker image and start/redeploy the MCP Task Orchestrator container, reusing the last-used config by default

Deploy to Docker

Build the MCP Task Orchestrator Docker image and start (or redeploy) the detached HTTP container that the active `.mcp.json` connects to. The Dockerfile handles its own Gradle build internally — no local build step needed.

On every deploy the command **detects the current container's settings and defaults to reusing them**, so you never have to re-specify things like `API_AUTH_MODE=none` after the first time. You can always review or change them via the chooser.

**Usage:** `/deploy_to_docker [image-tag] [--build-only] [--run] [--reuse]`

**Default (no flags):** Build the image, detect the existing container's config, then present a **[Reuse / Reconfigure]** chooser. Reuse redeploys with the same settings; Reconfigure walks the REST-mode / config-mount prompts. Matches the active `.mcp.json` (`type: http`, `url: http://localhost:3001/mcp`) — reachable after `/mcp reconnect mcp-task-orchestrator`.

**Arguments:**

  • `image-tag` (optional): Docker image tag. Default `task-orchestrator:current`. A bare name like `dev` → `task-orchestrator:dev`.
  • `--build-only`: Build the image only; start no container; no prompts.
  • `--run` / `--reconfigure`: Build, then go straight to the reconfigure prompts (skip the reuse chooser) — including STDIO/HTTP transport choice.
  • `--reuse`: Build, then redeploy with the detected settings **without prompting** (non-interactive redeploy).

**Examples:**

  • `/deploy_to_docker` — build, then Reuse-or-Reconfigure chooser
  • `/deploy_to_docker --reuse` — rebuild + redeploy identical settings, no prompts
  • `/deploy_to_docker --run` — build + full interactive reconfigure
  • `/deploy_to_docker --build-only` — build image only

---

Workflow

Step 1: Resolve Image Tag

  • `TARGET=runtime-current`, default tag `task-orchestrator:current`, data volume `mcp-task-data`.
  • A non-`--` tag argument is used as-is; a tag with no `:` gets `task-orchestrator:` prepended; no arg → default.

Step 2: Build Docker Image

docker build --target runtime-current -t <image-tag> .

Multi-stage build compiles from source — no prior `./gradlew build`.

Step 3: Verify Image

docker images | grep task-orchestrator

Report image ID and size.

Step 4: Determine Run Settings (detect → reuse or reconfigure)

**If `--build-only`:** skip to Step 5 — no container.

4a. Detect current settings

Read what the existing container was last started with (this is the source of truth for a redeploy — run it **before** removing the container):

# REST env + debug
docker inspect mcp-task-orchestrator-http --format '{{range .Config.Env}}{{println .}}{{end}}' 2>/dev/null \
  | grep -E 'API_ENABLED|API_AUTH_MODE|API_ALLOW_UNAUTHENTICATED|API_TOKENS_PATH|LOG_LEVEL' || echo '(no existing container)'
# config mount present?
docker inspect mcp-task-orchestrator-http --format '{{range .Mounts}}{{.Source}} -> {{.Destination}}{{println}}{{end}}' 2>/dev/null \
  | grep -q '/project/.taskorchestrator' && echo 'config-mount: floor' || echo 'config-mount: none'

Derive the **REST mode** from the env: `API_ENABLED=false` → **off**; `API_ENABLED=true` + `API_AUTH_MODE=none` → **unauthenticated**; `+ API_AUTH_MODE=bearer` → **bearer**.

If no container exists, fall back (in order) to: the persisted file `${HOME}/.taskorchestrator/deploy.env` (see 4d); else the **defaults** — HTTP transport, REST **off**, **floor** config mount, loopback `127.0.0.1:3001`, debug off.

Build a one-line `DETECTED` summary, e.g. `HTTP · REST=unauthenticated (local) · config-mount=none · debug=off · 127.0.0.1:3001 · image=task-orchestrator:current`.

4b. Chooser

  • **If `--reuse`:** skip prompting — use the detected settings, go to 4d.
  • **If `--run`/`--reconfigure`:** skip this chooser, go to 4c.
  • **Otherwise (default):** present the detected summary and ask:
AskUserQuestion(questions: [{
  question: "Detected config: <DETECTED>. Reuse it, or reconfigure?",
  header: "Deploy config",
  multiSelect: false,
  options: [
    { label: "Reuse detected settings", description: "Redeploy with the settings shown above — no further prompts" },
    { label: "Reconfigure", description: "Choose transport / REST API mode / config mount" }
  ]
}])

Reuse → 4d. Reconfigure → 4c.

4c. Reconfigure prompts

**Transport** (ask only on `--run`; the default/reconfigure path assumes **HTTP**, since `.mcp.json` uses HTTP):

AskUserQuestion(questions: [{
  question: "Which transport mode?", header: "Transport", multiSelect: false,
  options: [
    { label: "HTTP (Recommended)", description: "Serves /mcp on 127.0.0.1:3001, detached daemon — matches .mcp.json" },
    { label: "STDIO", description: "stdin/stdout, no port; interactive -i run (does not match the http .mcp.json)" }
  ]
}])

For **STDIO**, use the legacy interactive run (`docker run --rm -i -v mcp-task-data:/app/data [-v <pwd>/deploy/global-config/.taskorchestrator:/project/.taskorchestrator:ro -e AGENT_CONFIG_DIR=/project] [-e LOG_LEVEL=DEBUG -e DATABASE_SHOW_SQL=true] <image-tag>`) and skip the HTTP questions below.

For **HTTP**, ask:

**REST API mode** — pre-note the detected value as recommended:

AskUserQuestion(questions: [{
  question: "REST API mode? (the /api/v1 layer used by config-sync)", header: "REST API", multiSelect: false,
  options: [
    { label: "Off (MCP only)", description: "API_ENABLED=false — the /mcp endpoint only. Default for plain local MCP use." },
    { label: "Unauthenticated (local)", description: "API_ENABLED=true + API_AUTH_MODE=none + API_ALLOW_UNAUTHENTICATED=true. Token-free config-sync; loopback-bound ONLY." },
    { label: "Bearer (token file)", description: "API_ENABLED=true + API_AUTH_MODE=bearer + a mounted api-tokens.yaml. For authed / shared setups." }
  ]
}])
  • If **Bearer**, ask for the host path to the token YAML (via the "Other" free-tex
Read more
Ships withtask-orchestrator

Server-enforced workflow discipline for AI agents. Prompt-based frameworks hope the LLM follows instructions. This one blocks the call if it doesn't.

Get the whole plugin

Other commands on task-orchestrator.