[{"data":1,"prerenderedAt":952},["ShallowReactive",2],{"docs-nav":3,"docs:\u002Fdocs\u002Fhow-to\u002Ffrom-docker-swarm":151},[4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58,61,64,67,70,73,76,79,82,85,88,91,94,97,100,103,106,109,112,115,118,121,124,127,130,133,136,139,142,145,148],{"path":5,"title":6},"\u002Fdocs\u002Faccess-gating","Protect a local route",{"path":8,"title":9},"\u002Fdocs\u002Farchitecture\u002Fsecurity-and-trust","Security and trust",{"path":11,"title":12},"\u002Fdocs\u002Fconcepts\u002Fbuilds-and-deployments","Build and deploy",{"path":14,"title":15},"\u002Fdocs\u002Fconcepts\u002Fconfiguration-ownership","Where configuration belongs",{"path":17,"title":18},"\u002Fdocs\u002Fconcepts\u002Fenvironments-and-secrets","Environment values and secrets",{"path":20,"title":21},"\u002Fdocs\u002Fconcepts\u002Fmental-model","How projects fit together",{"path":23,"title":24},"\u002Fdocs\u002Fconcepts\u002Fplans-and-apply","Plans and apply",{"path":26,"title":27},"\u002Fdocs\u002Fconcepts\u002Ftargets-and-runtimes","Choose a target and runtime",{"path":29,"title":30},"\u002Fdocs\u002Fconfig-files","Ship config files with a service",{"path":32,"title":33},"\u002Fdocs\u002Fcontribute\u002Freleases","Publish a release",{"path":35,"title":36},"\u002Fdocs\u002Fdevelopment-mounts","Development mounts",{"path":38,"title":39},"\u002Fdocs\u002Fgetting-started","Getting started",{"path":41,"title":42},"\u002Fdocs\u002Fhardening","Harden services and choose their runtime",{"path":44,"title":45},"\u002Fdocs\u002Fhelp\u002Ffaq","FAQ",{"path":47,"title":48},"\u002Fdocs\u002Fhelp\u002Ftroubleshooting","Troubleshooting",{"path":50,"title":51},"\u002Fdocs\u002Fhow-to\u002Fcluster","Run a cluster",{"path":53,"title":54},"\u002Fdocs\u002Fhow-to\u002Fdeploy-production","Prepare a deployment environment",{"path":56,"title":57},"\u002Fdocs\u002Fhow-to\u002Ffrom-docker-swarm","Coming from Docker Swarm",{"path":59,"title":60},"\u002Fdocs\u002Fhow-to\u002Fproduction-checklist","Production checklist",{"path":62,"title":63},"\u002Fdocs","mm documentation",{"path":65,"title":66},"\u002Fdocs\u002Fjobs-and-schedules","Jobs and schedules",{"path":68,"title":69},"\u002Fdocs\u002Flocal-dashboard","Local dashboard",{"path":71,"title":72},"\u002Fdocs\u002Flocal-https","Local HTTPS",{"path":74,"title":75},"\u002Fdocs\u002Flocal-services","Local services",{"path":77,"title":78},"\u002Fdocs\u002Fmcp","Let an AI agent work on your project",{"path":80,"title":81},"\u002Fdocs\u002Fmulti-project-hosts","Run multiple projects on one host",{"path":83,"title":84},"\u002Fdocs\u002Fonboarding","Set up a project",{"path":86,"title":87},"\u002Fdocs\u002Fopenbao","Use OpenBao",{"path":89,"title":90},"\u002Fdocs\u002Fproject\u002Fcontributing","Contributing",{"path":92,"title":93},"\u002Fdocs\u002Fproject\u002Flicense","License",{"path":95,"title":96},"\u002Fdocs\u002Fproject\u002Fsecurity","Security",{"path":98,"title":99},"\u002Fdocs\u002Freference\u002Fcapability-matrix","Supported features and platforms",{"path":101,"title":102},"\u002Fdocs\u002Freference\u002Fcli","CLI command reference",{"path":104,"title":105},"\u002Fdocs\u002Freference\u002Fconfiguration","Configuration",{"path":107,"title":108},"\u002Fdocs\u002Freference\u002Fenvironment-variables","Environment variables",{"path":110,"title":111},"\u002Fdocs\u002Freference\u002Ferrors-and-exit-codes","Errors and exit codes",{"path":113,"title":114},"\u002Fdocs\u002Freference\u002Fknown-issues","Known limitations",{"path":116,"title":117},"\u002Fdocs\u002Fremote-access","Manage remote access",{"path":119,"title":120},"\u002Fdocs\u002Fremote-daemon","Set up a remote host",{"path":122,"title":123},"\u002Fdocs\u002Fruntime-observability","Status, logs, and commands",{"path":125,"title":126},"\u002Fdocs\u002Fsecret-delivery","Pass secrets to your app",{"path":128,"title":129},"\u002Fdocs\u002Fsecret-providers","Choose a secret store",{"path":131,"title":132},"\u002Fdocs\u002Fstart\u002Finstall","Install mm",{"path":134,"title":135},"\u002Fdocs\u002Fterminal-ui","Terminal UI",{"path":137,"title":138},"\u002Fdocs\u002Ftutorials\u002Fdotnet-web-api",".NET web API example",{"path":140,"title":141},"\u002Fdocs\u002Ftutorials\u002Ffirst-local-app","First local app",{"path":143,"title":144},"\u002Fdocs\u002Ftutorials\u002Flaravel-rust","Laravel and Rust example",{"path":146,"title":147},"\u002Fdocs\u002Ftutorials\u002Fnode-fullstack","Node full stack example",{"path":149,"title":150},"\u002Fdocs\u002Fvault","Use HashiCorp Vault",{"id":152,"title":57,"body":153,"description":945,"extension":946,"meta":947,"navigation":948,"path":56,"seo":949,"stem":950,"__hash__":951},"docs\u002Fdocs\u002Fhow-to\u002Ffrom-docker-swarm.md",{"type":154,"value":155,"toc":935},"minimark",[156,168,180,185,242,246,572,576,590,672,678,681,741,745,799,802,810,825,919],[157,158,159,163,164,167],"p",{},[160,161,162],"code",{},"mm"," replaces Docker Swarm. It runs a Compose project across several hosts,\nwith encrypted networks and service names that span them, rolling updates\nthat roll back, shared volumes, and one merged log. The nodes run plain Docker\nEngine, and nothing runs ",[160,165,166],{},"docker swarm init",".",[157,169,170,171,173,174,179],{},"This page maps what you know to what you write in ",[160,172,162],{},", lists the Compose keys\nto change, and gives the order to move a project in. ",[175,176,178],"a",{"href":177},".\u002Fcluster","Run a\ncluster"," is the guide for the cluster itself.",[181,182,184],"h2",{"id":183},"what-works-differently","What works differently",[186,187,188,203,216,230,236],"ul",{},[189,190,191,195,196,199,200,202],"li",{},[192,193,194],"strong",{},"No managers, workers, or quorum."," Every node is equal. Your machine, or\nCI, coordinates a deployment and talks to each node's ",[160,197,198],{},"mmd","; each ",[160,201,198],{},"\nchanges only its own host. Losing a node never costs the others their\nability to deploy.",[189,204,205,208,209,211,212,215],{},[192,206,207],{},"Nothing is rescheduled."," A Swarm moves a failed node's tasks elsewhere.\n",[160,210,162],{}," has no scheduler: a service runs on the nodes its ",[160,213,214],{},"placement"," names,\nand a node that goes down comes back with its own services. Place a service\non more than one node if it has to survive one.",[189,217,218,221,222,225,226,229],{},[192,219,220],{},"Every change is a plan."," ",[160,223,224],{},"mm deploy plan"," shows what each node will\nstart, change, and stop, and ",[160,227,228],{},"mm deploy apply"," takes the hash of the plan\nyou read.",[189,231,232,235],{},[192,233,234],{},"No routing mesh and no virtual IPs."," A service name resolves to the\naddresses of its healthy containers, and a port is published only on the\nnodes that run the service.",[189,237,238,241],{},[192,239,240],{},"A failed update returns every node."," A rollout goes one node at a time,\nand when a container fails its health check the nodes already changed go\nback to what they ran before.",[181,243,245],{"id":244},"concepts-and-commands","Concepts and commands",[247,248,249,262],"table",{},[250,251,252],"thead",{},[253,254,255,259],"tr",{},[256,257,258],"th",{},"In a Swarm",[256,260,261],{},"In mm",[263,264,265,292,300,312,330,345,357,370,380,398,414,422,430,440,448,463,477,493,506,525,544,559],"tbody",{},[253,266,267,277],{},[268,269,270,272,273,276],"td",{},[160,271,166],{},", ",[160,274,275],{},"join",", and join tokens",[268,278,279,280,283,284,287,288,167],{},"List the hosts under ",[160,281,282],{},"targets.\u003Cname>.nodes",", then run ",[160,285,286],{},"mm target setup",". See ",[175,289,291],{"href":290},".\u002Fcluster#set-up-the-nodes","set up the nodes",[253,293,294,297],{},[268,295,296],{},"Manager and worker roles",[268,298,299],{},"None. Every node is the same.",[253,301,302,307],{},[268,303,304],{},[160,305,306],{},"docker node ls",[268,308,309],{},[160,310,311],{},"mm target nodes",[253,313,314,317],{},[268,315,316],{},"Node labels and placement constraints",[268,318,319,322,323,272,326,329],{},[160,320,321],{},"placement:"," on the service: a node, a group from ",[160,324,325],{},"cluster.groups",[160,327,328],{},"all",", or a list.",[253,331,332,337],{},[268,333,334],{},[160,335,336],{},"docker stack deploy",[268,338,339,341,342,344],{},[160,340,224],{},", then ",[160,343,228],{}," with the plan's hash",[253,346,347,350],{},[268,348,349],{},"A stack",[268,351,352,353,356],{},"A stack: an entry under ",[160,354,355],{},"stacks:"," that names Compose files.",[253,358,359,362],{},[268,360,361],{},"A replicated service",[268,363,364,367,368,167],{},[160,365,366],{},"replicas:"," on the service: a count of containers over its ",[160,369,214],{},[253,371,372,375],{},[268,373,374],{},"A global service",[268,376,377],{},[160,378,379],{},"placement: all",[253,381,382,387],{},[268,383,384],{},[160,385,386],{},"docker service scale",[268,388,389,390,393,394,397],{},"Change ",[160,391,392],{},"replicas"," and deploy, or let ",[160,395,396],{},"autoscale:"," follow the load.",[253,399,400,403],{},[268,401,402],{},"An overlay network",[268,404,405,406,409,410,413],{},"A network under ",[160,407,408],{},"networks:"," in ",[160,411,412],{},"mm.yaml",". It spans the nodes that run a service on it.",[253,415,416,419],{},[268,417,418],{},"An encrypted overlay network",[268,420,421],{},"Always on: traffic between nodes travels inside WireGuard.",[253,423,424,427],{},[268,425,426],{},"A service's virtual IP",[268,428,429],{},"None. The service name resolves to its healthy containers, the ones on the asking node first.",[253,431,432,437],{},[268,433,434],{},[160,435,436],{},"tasks.\u003Cservice>",[268,438,439],{},"The same name, with the same meaning: every healthy container of the service.",[253,441,442,445],{},[268,443,444],{},"A port published on every node by the routing mesh",[268,446,447],{},"A port is published on the nodes that run the service. Point a load balancer or DNS at those nodes.",[253,449,450,455],{},[268,451,452],{},[160,453,454],{},"update_config",[268,456,457,460,461],{},[160,458,459],{},"update: {order, parallelism, failure}"," on the service in ",[160,462,412],{},[253,464,465,470],{},[268,466,467],{},[160,468,469],{},"docker service update --rollback",[268,471,472,473,476],{},"Automatic when a rollout fails. ",[160,474,475],{},"mm deploy rollback"," returns from one that finished.",[253,478,479,488],{},[268,480,481,484,485],{},[160,482,483],{},"docker service ls"," and ",[160,486,487],{},"docker service ps",[268,489,490],{},[160,491,492],{},"mm service status",[253,494,495,500],{},[268,496,497],{},[160,498,499],{},"docker service logs",[268,501,502,505],{},[160,503,504],{},"mm service logs",", merged across nodes in time order",[253,507,508,517],{},[268,509,510,513,514],{},[160,511,512],{},"docker secret"," and a service's ",[160,515,516],{},"secrets:",[268,518,519,520,524],{},"Secrets live in mm's secret store, or in OpenBao or Vault that ",[175,521,523],{"href":522},".\u002Fcluster#read-secrets-on-the-nodes","the nodes read",", and reach a service when it deploys.",[253,526,527,535],{},[268,528,529,513,532],{},[160,530,531],{},"docker config",[160,533,534],{},"configs:",[268,536,537,543],{},[175,538,540],{"href":539},".\u002Fcluster#ship-configuration-files",[160,541,542],{},"config-files:"," on the service: each node writes the file and mounts it read-only.",[253,545,546,549],{},[268,547,548],{},"A volume on shared storage",[268,550,551,554,555,167],{},[160,552,553],{},"shared-volumes:"," on the stack, for files that replicas share. Use local volumes for databases: see ",[175,556,558],{"href":557},".\u002Fcluster#share-a-volume-between-nodes","the limits",[253,560,561,566],{},[268,562,563],{},[160,564,565],{},"docker node update --availability drain",[268,567,568,569,571],{},"Change the ",[160,570,214],{}," of the node's services and deploy.",[181,573,575],{"id":574},"compose-keys","Compose keys",[157,577,578,579,582,583,585,586,589],{},"A Compose file written for a Swarm may place or multiply a service with keys\nthat only a Swarm reads. On a cluster target ",[160,580,581],{},"mm config validate"," and\n",[160,584,224],{}," fail, and a finding ",[160,587,588],{},"MM_COMPOSE_SWARM_KEY"," for each key says\nwhat to write:",[247,591,592,602],{},[250,593,594],{},[253,595,596,599],{},[256,597,598],{},"Compose key",[256,600,601],{},"Write instead",[263,603,604,617,627,645,662],{},[253,605,606,611],{},[268,607,608],{},[160,609,610],{},"deploy.mode: global",[268,612,613,460,615,167],{},[160,614,379],{},[160,616,412],{},[253,618,619,624],{},[268,620,621],{},[160,622,623],{},"deploy.mode: replicated",[268,625,626],{},"Nothing. Remove the key.",[253,628,629,635],{},[268,630,631,634],{},[160,632,633],{},"deploy.replicas"," above 1",[268,636,637,460,639,641,642,644],{},[160,638,366],{},[160,640,412],{},", with ",[160,643,321],{}," for its nodes.",[253,646,647,653],{},[268,648,649,652],{},[160,650,651],{},"deploy.placement"," (constraints and others)",[268,654,655,657,658,272,660,329],{},[160,656,321],{}," with a node, a group from ",[160,659,325],{},[160,661,328],{},[253,663,664,669],{},[268,665,666],{},[160,667,668],{},"deploy.endpoint_mode",[268,670,671],{},"Nothing. mm has no virtual IPs. Remove the key.",[157,673,674,675,677],{},"The same Compose file keeps working unchanged in an environment with one host:\nCompose reads these keys there and ",[160,676,214],{}," is not involved.",[157,679,680],{},"Three more things to change by hand:",[186,682,683,707,725],{},[189,684,685,693,694,696,697,460,700,702,703,167],{},[192,686,687,484,690],{},[160,688,689],{},"deploy.update_config",[160,691,692],{},"deploy.rollback_config"," are not read by\n",[160,695,162],{},". Set ",[160,698,699],{},"update:",[160,701,412],{},"; see ",[175,704,706],{"href":705},"..\u002Fremote-daemon#rolling-deploys-and-rollback","rolling deploys and\nrollback",[189,708,709,715,716,409,718,720,721,167],{},[192,710,711,712],{},"Networks with ",[160,713,714],{},"driver: overlay"," cannot be created outside a Swarm.\nRemove the driver from the Compose file and declare the network under\n",[160,717,408],{},[160,719,412],{},", then list it on the services that use it. See\n",[175,722,724],{"href":723},".\u002Fcluster#connect-services-across-nodes","connect services across nodes",[189,726,727,733,734,737,738,167],{},[192,728,729,732],{},[160,730,731],{},"depends_on"," between services on different nodes"," cannot be honoured by\nthe engine. The plan names each one it does not keep\n(",[160,735,736],{},"depends_on not kept: app\u002Fweb depends on db, which runs on db-1","); make the\nservice tolerate a dependency that is not up yet, or order the stacks with\n",[160,739,740],{},"after:",[181,742,744],{"id":743},"move-a-project","Move a project",[746,747,748,759,771,787,793],"ol",{},[189,749,750,751,753,754,758],{},"Add ",[160,752,162],{}," to the project so that it deploys on one machine first:\n",[175,755,757],{"href":756},"..\u002Fonboarding","add mm to a project",". Your Compose files stay.",[189,760,279,761,764,765,767,768,770],{},[160,762,763],{},"nodes:"," and give each service a ",[160,766,214],{},". Run\n",[160,769,581],{}," and change each key it names, using the tables above.",[189,772,773,774,341,777,780,781,783,784,786],{},"Use new hosts, or free the existing ones: remove the stack and take each\nhost out of the Swarm (",[160,775,776],{},"docker stack rm",[160,778,779],{},"docker swarm leave --force","\non every node) before you run ",[160,782,286],{},". A Swarm's own networks\nand ",[160,785,162],{}," should not manage the same engine.",[189,788,789,790,167],{},"Set up the nodes and deploy: ",[175,791,792],{"href":177},"run a cluster",[189,794,795,796,798],{},"Move the data. ",[160,797,162],{}," creates its own volumes and does not adopt the ones a\nSwarm stack created. Restore each database from a dump or a backup into\nthe new volume, and copy shared files into their shared volume.",[157,800,801],{},"With new hosts, keep the Swarm running until the new cluster serves traffic,\nthen move DNS.",[181,803,805,806,809],{"id":804},"projects-that-used-the-docker-swarm-driver","Projects that used the ",[160,807,808],{},"docker-swarm"," driver",[157,811,812,814,815,817,818,484,821,824],{},[160,813,162],{}," 0.1.0 had a ",[160,816,808],{}," runtime driver, and development builds after\nit added ",[160,819,820],{},"members:",[160,822,823],{},"swarm:"," to targets. Both are removed. To move such a\nproject:",[186,826,827,837,853,896,902],{},[189,828,829,830,833,834,167],{},"Set ",[160,831,832],{},"runtime.driver"," to ",[160,835,836],{},"docker-compose",[189,838,839,840,842,843,845,846,849,850,167],{},"List former ",[160,841,820],{}," under ",[160,844,282],{},", each with a ",[160,847,848],{},"name"," and\na ",[160,851,852],{},"host",[189,854,855,856,833,859,862,863,866,867,870,871,874,875,878,879,484,882,885,886,889,890,870,893,167],{},"Rename ",[160,857,858],{},"targets.\u003Cname>.swarm:",[160,860,861],{},"cluster:",". ",[160,864,865],{},"private-network.wireguard","\nbecomes ",[160,868,869],{},"mesh",", and ",[160,872,873],{},"private-network.interface"," becomes ",[160,876,877],{},"mesh.interface",".\n",[160,880,881],{},"storage",[160,883,884],{},"groups"," keep their names. Drop ",[160,887,888],{},"address-pool",",\n",[160,891,892],{},"address-pool-mask",[160,894,895],{},"ingress",[189,897,898,899,167],{},"Delete ",[160,900,901],{},"environments.\u003Cenv>.tls",[189,903,904,905,907,908,910,911,914,915,918],{},"In ",[160,906,321],{},", use a node name, a group name, ",[160,909,328],{},", or a list. ",[160,912,913],{},"managers","\nand ",[160,916,917],{},"any"," are no longer accepted.",[157,920,921,922,925,926,272,928,870,931,934],{},"A configuration that still uses a removed key fails to load with a message\nthat names its replacement. The ",[160,923,924],{},"mm target swarm"," commands are gone:\n",[160,927,311],{},[160,929,930],{},"mm target mesh status",[160,932,933],{},"mm target storage status","\nshow the cluster.",{"title":936,"searchDepth":937,"depth":937,"links":938},"",2,[939,940,941,942,943],{"id":183,"depth":937,"text":184},{"id":244,"depth":937,"text":245},{"id":574,"depth":937,"text":575},{"id":743,"depth":937,"text":744},{"id":804,"depth":937,"text":944},"Projects that used the docker-swarm driver","How Swarm concepts, commands, and Compose keys map to an mm cluster.","md",{},true,{"title":57,"description":945},"docs\u002Fhow-to\u002Ffrom-docker-swarm","RONjkC6m0aXefPJ-LGmx6Xnz2HwHXIBdQslmGSMJVBI",1794776823733]