Skip to content

Migrate docker-compose pages to reference pattern (Rosetta-style) #1200

@dkijania

Description

@dkijania

Part of #1195 (Track 3). Blocked on MinaProtocol/mina#18826.

Goal

Rewrite the four docker-compose docs pages to mirror the existing Rosetta page (docs/exchange-operators/rosetta/docker-compose.mdx) — a thin narrative wrapper around canonical compose recipes living in MinaProtocol/mina. This removes the inline YAML and the tag drift that comes with it.

Why this approach (vs. inline + tag check, or build-time embed)

The Rosetta page is the proven model. It has dense, scrapeable content (services table, env-var tables, make targets, verification commands) that describes the contract — not the content — of the deployment. The actual docker-compose.yml lives in mina, which means:

  • No drift. Tags, image names, and flags update in one place.
  • AI agents prefer it. Modern coding agents (Claude Code, Cursor, etc.) follow GitHub links, clone, and run make mainnet. A self-contained dir + README is the ideal artifact for that workflow — better than inline YAML they have to paste.
  • Naive RAG indexers prefer all-in-one, but llms-full.txt already serves that crowd at the bundle level.

Inline + drift-check CI was rejected: every release would re-trigger a paste cycle. Build-time embed was rejected: extra CI complexity for marginal benefit once we have the wrapper pattern.

Pages to rewrite

  • docs/node-operators/block-producer-node/docker-compose.mdx
  • docs/node-operators/archive-node/docker-compose.mdx
  • docs/node-operators/snark-workers/docker-compose.mdx
  • docs/node-operators/seed-peers/docker-compose.mdx

Page template (mirror Rosetta exactly)

Each rewritten page should have these sections, in this order, matching docs/exchange-operators/rosetta/docker-compose.mdx:

  1. Intro paragraph + link to canonical dir in mina (e.g. mina/src/app/cli/docker-compose/block-producer/).
  2. Quick startgit clone, cd, cp example.<network>.env .env, vi .env, docker compose up -d / make <network>.
  3. Services overview — markdown table.
  4. Configuration — env-var tables grouped by concern (Docker images, Network, Ports, role-specific).
  5. Data persistence — bind-mount table.
  6. Make targets — table.
  7. Verifying the deployment — sample commands.
  8. Clean startmake clean + restart.

Strip all inline services: YAML.

Acceptance criteria

  • All four pages rewritten to mirror Rosetta's section order and tone.
  • No inline docker-compose.yml content remains on these pages.
  • Each page links to the canonical dir in mina (URL must resolve — verify in PR review).
  • Sidebar labels unchanged.
  • validate-docker-images script either dropped for these pages or pointed at the canonical files in mina.
  • llms-full.txt regenerated.

Optional CI follow-up (separate PR)

Two cheap drift-detection checks:

  • Link liveness — assert every github.com/MinaProtocol/mina/... URL in docker-compose.mdx files resolves to an existing path on the referenced branch.
  • Contract drift — parse the canonical docker-compose.yml and .env.example from mina and assert that env vars / service names / make targets named in the doc tables match. Catches MINA_REST_PORT renames and similar.

Both are short Node scripts, run in the same CI step as validate-docker-images.

Blocked on

MinaProtocol/mina#18826 — the canonical compose dirs for block-producer, snark-worker, seed-peer, and archive must land in mina before the docs2 wrappers have anywhere to point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions