docs(tutorials): add self-hosted workspace Docker deployment guide #40

Open
technical-writer wants to merge 3 commits from docs/self-hosted-workspace-docker into main

3 Commits

Author SHA1 Message Date
documentation-specialist 55d8f404f3 ci: add explicit timeout-minutes to CI build job
Secret scan / secret-scan (pull_request) Successful in 0s
CI / build (pull_request) Successful in 4m38s
2026-05-15 13:00:40 +00:00
technical-writer b12527b11e fix(tutorials): correct env vars, healthcheck endpoint, and k8s grace period
CI / build (pull_request) Failing after 56s
Secret scan / secret-scan (pull_request) Successful in 1s
Verification against workspace/main.py (b49ccff submodule) and
workspace-runtime.md (molecule-core main):

- PLATFORM_URL: MOLECULE_API_URL does not exist in the workspace
  runtime; correct env var is PLATFORM_URL (workspace/main.py line 85).
  Updated all occurrences: env vars table, Docker run, Docker Compose,
  Python example, troubleshooting table.

- MOLECULE_API_KEY: not a real workspace env var; removed from Docker
  run and Compose examples. The workspace runtime obtains its bearer
  token from the platform automatically during registration.

- AGENT_CARD_URL: not a real env var; removed from env vars table.
  The workspace generates its URL internally from HOSTNAME+port.

- Healthcheck endpoint: /agent/card is the MCP HTTP/SSE transport
  path (separate binary). The A2A workspace agent serves the Agent
  Card at /.well-known/agent-card.json (confirmed in boot_routes.py
  and agent-card.md). Updated all healthcheck targets accordingly.

- Kubernetes terminationGracePeriodSeconds: 30s is incompatible with
  the liveness probe (initialDelay=30 + 3×30s = ~120–150s to
  register a failure). Changed to 120s and corrected the note to
  reflect the actual failure window.

- Python example: replaced non-existent RemoteAgentClient with correct
  HeartbeatLoop class from heartbeat.py.

- Graceful shutdown description: corrected to reflect uvicorn's actual
  shutdown behavior (heartbeat.stop() in finally block) rather than
  the non-existent stop_event pattern.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 05:09:07 +00:00
technical-writer b6e3b8e8e0 docs(tutorials): add self-hosted workspace Docker deployment guide
Secret scan / secret-scan (pull_request) Successful in 1m20s
CI / build (pull_request) Successful in 2m44s
Covers Docker image pull, required env vars (MOLECULE_API_URL,
MOLECULE_API_KEY, WORKSPACE_ID, PORT), built-in HEALTHCHECK probe
(/agent/card every 30s), Docker Compose config, graceful SIGTERM
shutdown via stop_event threading.Event, and Kubernetes liveness/readiness
probe configuration.

Closes gap: no self-hosted Docker workspace deployment docs existed
despite molecule-core#883 HEALTHCHECK shipping in 2026-05-13.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 04:54:04 +00:00