[{"data":1,"prerenderedAt":1426},["ShallowReactive",2],{"navigation_docs":3,"-guides-recipes":184,"-guides-recipes-surround":1421},[4,35,94,119,139,154,174,179],{"title":5,"path":6,"stem":7,"children":8,"page":34},"Get Started","\u002Fget-started","1.get-started",[9,14,19,24,29],{"title":10,"path":11,"stem":12,"icon":13},"Introduction","\u002Fget-started\u002Fintroduction","1.get-started\u002F1.introduction","i-lucide-house",{"title":15,"path":16,"stem":17,"icon":18},"Installation","\u002Fget-started\u002Finstallation","1.get-started\u002F2.installation","i-lucide-download",{"title":20,"path":21,"stem":22,"icon":23},"Quick start","\u002Fget-started\u002Fquickstart","1.get-started\u002F3.quickstart","i-lucide-rocket",{"title":25,"path":26,"stem":27,"icon":28},"Project structure","\u002Fget-started\u002Fproject-structure","1.get-started\u002F4.project-structure","i-lucide-folder-tree",{"title":30,"path":31,"stem":32,"icon":33},"Dashboard","\u002Fget-started\u002Fdashboard","1.get-started\u002F5.dashboard","i-lucide-layout-dashboard",false,{"title":36,"path":37,"stem":38,"children":39,"page":34},"Concepts","\u002Fconcepts","2.concepts",[40,45,50,55,60,65,70,75,79,84,89],{"title":41,"path":42,"stem":43,"icon":44},"Architecture","\u002Fconcepts\u002Farchitecture","2.concepts\u002F1.architecture","i-lucide-layers",{"title":46,"path":47,"stem":48,"icon":49},"Glossary","\u002Fconcepts\u002Fglossary","2.concepts\u002F10.glossary","i-lucide-book-marked",{"title":51,"path":52,"stem":53,"icon":54},"Secrets","\u002Fconcepts\u002Fsecrets","2.concepts\u002F11.secrets","i-lucide-key-round",{"title":56,"path":57,"stem":58,"icon":59},"Machines","\u002Fconcepts\u002Fmachines","2.concepts\u002F2.machines","i-lucide-server",{"title":61,"path":62,"stem":63,"icon":64},"Colony & users","\u002Fconcepts\u002Fcolony","2.concepts\u002F3.colony","i-lucide-users",{"title":66,"path":67,"stem":68,"icon":69},"Transport","\u002Fconcepts\u002Ftransport","2.concepts\u002F4.transport","i-lucide-network",{"title":71,"path":72,"stem":73,"icon":74},"Configuration","\u002Fconcepts\u002Fconfiguration","2.concepts\u002F5.configuration","i-lucide-settings",{"title":76,"path":77,"stem":78,"icon":23},"Deploy","\u002Fconcepts\u002Fdeploy","2.concepts\u002F6.deploy",{"title":80,"path":81,"stem":82,"icon":83},"Groups","\u002Fconcepts\u002Fgroups","2.concepts\u002F7.groups","i-lucide-boxes",{"title":85,"path":86,"stem":87,"icon":88},"Templates","\u002Fconcepts\u002Ftemplates","2.concepts\u002F8.templates","i-lucide-package-plus",{"title":90,"path":91,"stem":92,"icon":93},"Existing projects","\u002Fconcepts\u002Fexisting-projects","2.concepts\u002F9.existing-projects","i-lucide-folder-open",{"title":95,"path":96,"stem":97,"children":98,"page":34},"Remote","\u002Fremote","3.remote",[99,104,109,114],{"title":100,"path":101,"stem":102,"icon":103},"Remote machines","\u002Fremote\u002Foverview","3.remote\u002F1.overview","i-lucide-cloud",{"title":105,"path":106,"stem":107,"icon":108},"Remote deploy","\u002Fremote\u002Fdeploy","3.remote\u002F2.deploy","i-lucide-send",{"title":110,"path":111,"stem":112,"icon":113},"CI","\u002Fremote\u002Fci","3.remote\u002F3.ci","i-lucide-workflow",{"title":115,"path":116,"stem":117,"icon":118},"Tunnels","\u002Fremote\u002Ftunnel","3.remote\u002F4.tunnel","i-lucide-cable",{"title":120,"path":121,"stem":122,"children":123,"page":34},"Security","\u002Fsecurity","4.security",[124,129,134],{"title":125,"path":126,"stem":127,"icon":128},"Security model","\u002Fsecurity\u002Fmodel","4.security\u002F1.model","i-lucide-shield",{"title":130,"path":131,"stem":132,"icon":133},"Known issues","\u002Fsecurity\u002Fknown-issues","4.security\u002F2.known-issues","i-lucide-triangle-alert",{"title":135,"path":136,"stem":137,"icon":138},"Threat model","\u002Fsecurity\u002Fthreat-model","4.security\u002F3.threat-model","i-lucide-shield-alert",{"title":140,"path":141,"stem":142,"children":143,"page":34},"Reference","\u002Freference","5.reference",[144,149],{"title":145,"path":146,"stem":147,"icon":148},"CLI reference","\u002Freference\u002Fcli","5.reference\u002F1.cli","i-lucide-terminal",{"title":150,"path":151,"stem":152,"icon":153},"Status matrix","\u002Freference\u002Fstatus","5.reference\u002F2.status","i-lucide-list-checks",{"title":155,"path":156,"stem":157,"children":158,"page":34},"Guides","\u002Fguides","6.guides",[159,164,169],{"title":160,"path":161,"stem":162,"icon":163},"Recipes","\u002Fguides\u002Frecipes","6.guides\u002F1.recipes","i-lucide-cooking-pot",{"title":165,"path":166,"stem":167,"icon":168},"Troubleshooting and FAQ","\u002Fguides\u002Ftroubleshooting","6.guides\u002F2.troubleshooting","i-lucide-life-buoy",{"title":170,"path":171,"stem":172,"icon":173},"Comparison and when not to use Ant","\u002Fguides\u002Fcomparison","6.guides\u002F3.comparison","i-lucide-scale",{"title":175,"path":176,"stem":177,"icon":178},"Changelog","\u002Fchangelog","changelog","i-lucide-history",{"title":180,"path":181,"stem":182,"icon":183},"Communities","\u002Fcommunities","communities","i-lucide-heart-handshake",{"id":185,"title":160,"body":186,"description":1413,"extension":1414,"links":1415,"meta":1416,"navigation":1417,"path":161,"seo":1418,"stem":162,"__hash__":1420},"docs\u002F6.guides\u002F1.recipes.md",{"type":187,"value":188,"toc":1402},"minimark",[189,198,203,218,335,350,354,361,538,572,594,598,608,633,640,655,665,669,684,748,763,766,781,794,798,805,890,929,946,950,960,994,1011,1015,1025,1064,1255,1268,1272,1285,1353,1378,1382,1398],[190,191,192,193,197],"p",{},"Each recipe is a small, complete workflow. They assume a signed-in account\n(",[194,195,196],"code",{},"ant colony signup",") only where remote machines are involved; local recipes\nneed nothing but Docker and the CLI.",[199,200,202],"h2",{"id":201},"a-static-site-on-this-machine","A static site on this machine",[190,204,205,206,209,210,213,214,217],{},"A tiny Dockerfile is all the detection needs; ",[194,207,208],{},"ant nest init"," sees it and\nwrites ",[194,211,212],{},"build: dockerfile",", ",[194,215,216],{},"run: container",".",[219,220,225],"pre",{"className":221,"code":222,"language":223,"meta":224,"style":224},"language-sh shiki shiki-themes material-theme-lighter github-light github-dark","mkdir mysite && cd mysite\n\ncat > index.html \u003C\u003C'EOF'\n\u003Ch1>Hello from Ant\u003C\u002Fh1>\nEOF\n\ncat > Dockerfile \u003C\u003C'EOF'\nFROM python:3-alpine\nWORKDIR \u002Fsite\nCOPY index.html .\nEXPOSE 8080\nCMD [\"python\", \"-m\", \"http.server\", \"8080\"]\nEOF\n\nant nest tools                # Docker present, daemon answering\nant nest init --port 8080     # writes ant.yaml\nant trail deploy local        # build + run; prints the container and URL\nant trail status\n","sh","",[194,226,227,235,242,248,254,260,265,271,277,283,289,295,301,306,311,317,323,329],{"__ignoreMap":224},[228,229,232],"span",{"class":230,"line":231},"line",1,[228,233,234],{},"mkdir mysite && cd mysite\n",[228,236,238],{"class":230,"line":237},2,[228,239,241],{"emptyLinePlaceholder":240},true,"\n",[228,243,245],{"class":230,"line":244},3,[228,246,247],{},"cat > index.html \u003C\u003C'EOF'\n",[228,249,251],{"class":230,"line":250},4,[228,252,253],{},"\u003Ch1>Hello from Ant\u003C\u002Fh1>\n",[228,255,257],{"class":230,"line":256},5,[228,258,259],{},"EOF\n",[228,261,263],{"class":230,"line":262},6,[228,264,241],{"emptyLinePlaceholder":240},[228,266,268],{"class":230,"line":267},7,[228,269,270],{},"cat > Dockerfile \u003C\u003C'EOF'\n",[228,272,274],{"class":230,"line":273},8,[228,275,276],{},"FROM python:3-alpine\n",[228,278,280],{"class":230,"line":279},9,[228,281,282],{},"WORKDIR \u002Fsite\n",[228,284,286],{"class":230,"line":285},10,[228,287,288],{},"COPY index.html .\n",[228,290,292],{"class":230,"line":291},11,[228,293,294],{},"EXPOSE 8080\n",[228,296,298],{"class":230,"line":297},12,[228,299,300],{},"CMD [\"python\", \"-m\", \"http.server\", \"8080\"]\n",[228,302,304],{"class":230,"line":303},13,[228,305,259],{},[228,307,309],{"class":230,"line":308},14,[228,310,241],{"emptyLinePlaceholder":240},[228,312,314],{"class":230,"line":313},15,[228,315,316],{},"ant nest tools                # Docker present, daemon answering\n",[228,318,320],{"class":230,"line":319},16,[228,321,322],{},"ant nest init --port 8080     # writes ant.yaml\n",[228,324,326],{"class":230,"line":325},17,[228,327,328],{},"ant trail deploy local        # build + run; prints the container and URL\n",[228,330,332],{"class":230,"line":331},18,[228,333,334],{},"ant trail status\n",[190,336,337,338,341,342,345,346,349],{},"Change and redeploy with ",[194,339,340],{},"ant trail deploy local"," again; ",[194,343,344],{},"ant trail logs --tail 50","\nshows the container output. ",[194,347,348],{},"ant trail destroy local --yes"," removes the\ncontainer and the images Ant built for it.",[199,351,353],{"id":352},"a-node-api-with-postgres-via-compose","A Node API with Postgres via compose",[190,355,356,357,360],{},"Ant keeps your compose file as the source of truth. Every service that declares\n",[194,358,359],{},"build:"," is built, and repository services are pulled.",[219,362,366],{"className":363,"code":364,"language":365,"meta":224,"style":224},"language-yaml shiki shiki-themes material-theme-lighter github-light github-dark","# compose.yaml\nservices:\n  api:\n    build: .\n    ports: [\"3000:3000\"]\n    environment:\n      DATABASE_URL: ${DATABASE_URL}\n    depends_on: [db]\n  db:\n    image: postgres:17\n    environment:\n      POSTGRES_USER: app\n      POSTGRES_PASSWORD: secret\n      POSTGRES_DB: app\n    volumes:\n      - pgdata:\u002Fvar\u002Flib\u002Fpostgresql\u002Fdata\nvolumes:\n  pgdata:\n","yaml",[194,367,368,374,384,391,403,426,433,443,457,464,474,480,490,500,509,516,524,531],{"__ignoreMap":224},[228,369,370],{"class":230,"line":231},[228,371,373],{"class":372},"sutJx","# compose.yaml\n",[228,375,376,380],{"class":230,"line":237},[228,377,379],{"class":378},"sQzsp","services",[228,381,383],{"class":382},"sP7_E",":\n",[228,385,386,389],{"class":230,"line":244},[228,387,388],{"class":378},"  api",[228,390,383],{"class":382},[228,392,393,396,399],{"class":230,"line":250},[228,394,395],{"class":378},"    build",[228,397,398],{"class":382},":",[228,400,402],{"class":401},"srdBf"," .\n",[228,404,405,408,410,413,417,421,423],{"class":230,"line":256},[228,406,407],{"class":378},"    ports",[228,409,398],{"class":382},[228,411,412],{"class":382}," [",[228,414,416],{"class":415},"sjJ54","\"",[228,418,420],{"class":419},"s_sjI","3000:3000",[228,422,416],{"class":415},[228,424,425],{"class":382},"]\n",[228,427,428,431],{"class":230,"line":262},[228,429,430],{"class":378},"    environment",[228,432,383],{"class":382},[228,434,435,438,440],{"class":230,"line":267},[228,436,437],{"class":378},"      DATABASE_URL",[228,439,398],{"class":382},[228,441,442],{"class":419}," ${DATABASE_URL}\n",[228,444,445,448,450,452,455],{"class":230,"line":273},[228,446,447],{"class":378},"    depends_on",[228,449,398],{"class":382},[228,451,412],{"class":382},[228,453,454],{"class":419},"db",[228,456,425],{"class":382},[228,458,459,462],{"class":230,"line":279},[228,460,461],{"class":378},"  db",[228,463,383],{"class":382},[228,465,466,469,471],{"class":230,"line":285},[228,467,468],{"class":378},"    image",[228,470,398],{"class":382},[228,472,473],{"class":419}," postgres:17\n",[228,475,476,478],{"class":230,"line":291},[228,477,430],{"class":378},[228,479,383],{"class":382},[228,481,482,485,487],{"class":230,"line":297},[228,483,484],{"class":378},"      POSTGRES_USER",[228,486,398],{"class":382},[228,488,489],{"class":419}," app\n",[228,491,492,495,497],{"class":230,"line":303},[228,493,494],{"class":378},"      POSTGRES_PASSWORD",[228,496,398],{"class":382},[228,498,499],{"class":419}," secret\n",[228,501,502,505,507],{"class":230,"line":308},[228,503,504],{"class":378},"      POSTGRES_DB",[228,506,398],{"class":382},[228,508,489],{"class":419},[228,510,511,514],{"class":230,"line":313},[228,512,513],{"class":378},"    volumes",[228,515,383],{"class":382},[228,517,518,521],{"class":230,"line":319},[228,519,520],{"class":382},"      -",[228,522,523],{"class":419}," pgdata:\u002Fvar\u002Flib\u002Fpostgresql\u002Fdata\n",[228,525,526,529],{"class":230,"line":325},[228,527,528],{"class":378},"volumes",[228,530,383],{"class":382},[228,532,533,536],{"class":230,"line":331},[228,534,535],{"class":378},"  pgdata",[228,537,383],{"class":382},[219,539,541],{"className":221,"code":540,"language":223,"meta":224,"style":224},"ant nest init --build none --run compose --file compose.yaml\nant nest edit secret add DATABASE_URL     # resolved at deploy time, never stored\nexport DATABASE_URL='postgres:\u002F\u002Fapp:secret@db:5432\u002Fapp'\nant trail deploy local\nant trail status\nant trail logs local db --tail 50         # one service's logs\n",[194,542,543,548,553,558,563,567],{"__ignoreMap":224},[228,544,545],{"class":230,"line":231},[228,546,547],{},"ant nest init --build none --run compose --file compose.yaml\n",[228,549,550],{"class":230,"line":237},[228,551,552],{},"ant nest edit secret add DATABASE_URL     # resolved at deploy time, never stored\n",[228,554,555],{"class":230,"line":244},[228,556,557],{},"export DATABASE_URL='postgres:\u002F\u002Fapp:secret@db:5432\u002Fapp'\n",[228,559,560],{"class":230,"line":250},[228,561,562],{},"ant trail deploy local\n",[228,564,565],{"class":230,"line":256},[228,566,334],{},[228,568,569],{"class":230,"line":262},[228,570,571],{},"ant trail logs local db --tail 50         # one service's logs\n",[190,573,574,575,578,579,582,583,586,587,590,591,593],{},"The ",[194,576,577],{},"${DATABASE_URL}"," reference is filled in at deploy time; for a team, keep\nthe value in a manager and name it as a provider instead of exporting it. See\n",[580,581,51],"a",{"href":52},". To run the same stack on a machine, set\n",[194,584,585],{},"machine: prod"," and deploy with ",[194,588,589],{},"ant trail deploy prod","; the compose file is\nresolved here and shipped, and each ",[194,592,359],{}," service is built on the machine.",[199,595,597],{"id":596},"a-container-with-a-domain-through-caddy","A container with a domain through Caddy",[190,599,600,601,604,605,217],{},"Domains are opt-in and route through the managed Caddy. For a container\nproject, the domain can route to ",[194,602,603],{},"deploy.port"," and needs no ",[194,606,607],{},"--service",[219,609,611],{"className":221,"code":610,"language":223,"meta":224,"style":224},"ant nest edit domain add --subdomain hello   # → hello.localhost\nant trail deploy local                        # redeploy applies the route\ncurl http:\u002F\u002Fhello.localhost\nant nest edit domain list\n",[194,612,613,618,623,628],{"__ignoreMap":224},[228,614,615],{"class":230,"line":231},[228,616,617],{},"ant nest edit domain add --subdomain hello   # → hello.localhost\n",[228,619,620],{"class":230,"line":237},[228,621,622],{},"ant trail deploy local                        # redeploy applies the route\n",[228,624,625],{"class":230,"line":244},[228,626,627],{},"curl http:\u002F\u002Fhello.localhost\n",[228,629,630],{"class":230,"line":250},[228,631,632],{},"ant nest edit domain list\n",[190,634,635,636,639],{},"Check the proxy if the name does not answer: ",[194,637,638],{},"ant nest tools caddy status",".\nFor a remote machine, name the real hostname and point its DNS at the machine:",[219,641,643],{"className":221,"code":642,"language":223,"meta":224,"style":224},"ant nest edit domain add app.example.com\nant trail deploy prod        # refused if the machine's Caddy is unreachable\n",[194,644,645,650],{"__ignoreMap":224},[228,646,647],{"class":230,"line":231},[228,648,649],{},"ant nest edit domain add app.example.com\n",[228,651,652],{"class":230,"line":237},[228,653,654],{},"ant trail deploy prod        # refused if the machine's Caddy is unreachable\n",[190,656,657,658,661,662,217],{},"Ports 80\u002F443 must be open on the machine for ACME and app traffic. To keep a\ndeployment off Caddy entirely, deploy with ",[194,659,660],{},"--no-caddy",". See\n",[580,663,71],{"href":664},"\u002Fconcepts\u002Fconfiguration#domains",[199,666,668],{"id":667},"pulling-from-a-private-registry","Pulling from a private registry",[190,670,671,672,675,676,679,680,683],{},"With ",[194,673,674],{},"deploy.registry"," set, a source-built remote deploy builds here, pushes\n",[194,677,678],{},"\u003Chost>\u002F\u003Crepository>\u002F\u003Capp>:\u003Crelease>",", and the machine pulls it. The password\ncomes from the environment and travels with the deploy as a short-lived,\nworker-side credential; it is never written to ",[194,681,682],{},"ant.yaml"," or the machine.",[219,685,687],{"className":363,"code":686,"language":365,"meta":224,"style":224},"# ant.yaml\ndeploy:\n  registry:\n    type: external\n    host: ghcr.io\n    repository: acme\u002Fapi\n    username: acme\n",[194,688,689,694,701,708,718,728,738],{"__ignoreMap":224},[228,690,691],{"class":230,"line":231},[228,692,693],{"class":372},"# ant.yaml\n",[228,695,696,699],{"class":230,"line":237},[228,697,698],{"class":378},"deploy",[228,700,383],{"class":382},[228,702,703,706],{"class":230,"line":244},[228,704,705],{"class":378},"  registry",[228,707,383],{"class":382},[228,709,710,713,715],{"class":230,"line":250},[228,711,712],{"class":378},"    type",[228,714,398],{"class":382},[228,716,717],{"class":419}," external\n",[228,719,720,723,725],{"class":230,"line":256},[228,721,722],{"class":378},"    host",[228,724,398],{"class":382},[228,726,727],{"class":419}," ghcr.io\n",[228,729,730,733,735],{"class":230,"line":262},[228,731,732],{"class":378},"    repository",[228,734,398],{"class":382},[228,736,737],{"class":419}," acme\u002Fapi\n",[228,739,740,743,745],{"class":230,"line":267},[228,741,742],{"class":378},"    username",[228,744,398],{"class":382},[228,746,747],{"class":419}," acme\n",[219,749,751],{"className":221,"code":750,"language":223,"meta":224,"style":224},"export ANT_REGISTRY_PASSWORD=…     # masked in CI\nant trail deploy prod              # build here, push, machine pulls\n",[194,752,753,758],{"__ignoreMap":224},[228,754,755],{"class":230,"line":231},[228,756,757],{},"export ANT_REGISTRY_PASSWORD=…     # masked in CI\n",[228,759,760],{"class":230,"line":237},[228,761,762],{},"ant trail deploy prod              # build here, push, machine pulls\n",[190,764,765],{},"The image-only form takes the registry-qualified reference directly:",[219,767,769],{"className":221,"code":768,"language":223,"meta":224,"style":224},"export ANT_REGISTRY_USERNAME=acme ANT_REGISTRY_PASSWORD=…\nant trail deploy --image ghcr.io\u002Facme\u002Fapi:1.4.2 --pull --machine prod --port 3000\n",[194,770,771,776],{"__ignoreMap":224},[228,772,773],{"class":230,"line":231},[228,774,775],{},"export ANT_REGISTRY_USERNAME=acme ANT_REGISTRY_PASSWORD=…\n",[228,777,778],{"class":230,"line":237},[228,779,780],{},"ant trail deploy --image ghcr.io\u002Facme\u002Fapi:1.4.2 --pull --machine prod --port 3000\n",[190,782,783,784,787,788,791,792,217],{},"On a machine shared by several people, prefer a one-time ",[194,785,786],{},"docker login"," on the\nmachine and omit ",[194,789,790],{},"ANT_REGISTRY_PASSWORD",", so the pull credential does not ride\nevery deploy. See ",[580,793,105],{"href":106},[199,795,797],{"id":796},"the-same-app-on-two-machines","The same app on two machines",[190,799,800,801,804],{},"Two deployments, one per machine; ",[194,802,803],{},"server:"," overrides the project's base\ntarget per environment, and each gets its own resource name.",[219,806,808],{"className":363,"code":807,"language":365,"meta":224,"style":224},"# ant.yaml\napp: api\ndeploy:\n  run: container\n  port: 3000\ndeployments:\n  west:\n    server: west\n  east:\n    server: east\n",[194,809,810,814,824,830,840,850,857,864,874,881],{"__ignoreMap":224},[228,811,812],{"class":230,"line":231},[228,813,693],{"class":372},[228,815,816,819,821],{"class":230,"line":237},[228,817,818],{"class":378},"app",[228,820,398],{"class":382},[228,822,823],{"class":419}," api\n",[228,825,826,828],{"class":230,"line":244},[228,827,698],{"class":378},[228,829,383],{"class":382},[228,831,832,835,837],{"class":230,"line":250},[228,833,834],{"class":378},"  run",[228,836,398],{"class":382},[228,838,839],{"class":419}," container\n",[228,841,842,845,847],{"class":230,"line":256},[228,843,844],{"class":378},"  port",[228,846,398],{"class":382},[228,848,849],{"class":401}," 3000\n",[228,851,852,855],{"class":230,"line":262},[228,853,854],{"class":378},"deployments",[228,856,383],{"class":382},[228,858,859,862],{"class":230,"line":267},[228,860,861],{"class":378},"  west",[228,863,383],{"class":382},[228,865,866,869,871],{"class":230,"line":273},[228,867,868],{"class":378},"    server",[228,870,398],{"class":382},[228,872,873],{"class":419}," west\n",[228,875,876,879],{"class":230,"line":279},[228,877,878],{"class":378},"  east",[228,880,383],{"class":382},[228,882,883,885,887],{"class":230,"line":285},[228,884,868],{"class":378},[228,886,398],{"class":382},[228,888,889],{"class":419}," east\n",[219,891,893],{"className":221,"code":892,"language":223,"meta":224,"style":224},"ant nest machines add west --host 203.0.113.10 --ssh-key ~\u002F.ssh\u002Fid_ed25519\nant nest machines add east --host 203.0.113.20 --ssh-key ~\u002F.ssh\u002Fid_ed25519\n\nant trail deploy west         # builds on west, runs there\nant trail deploy east         # builds on east, runs there\nant trail status west\nant nest containers list --machine east\n",[194,894,895,900,905,909,914,919,924],{"__ignoreMap":224},[228,896,897],{"class":230,"line":231},[228,898,899],{},"ant nest machines add west --host 203.0.113.10 --ssh-key ~\u002F.ssh\u002Fid_ed25519\n",[228,901,902],{"class":230,"line":237},[228,903,904],{},"ant nest machines add east --host 203.0.113.20 --ssh-key ~\u002F.ssh\u002Fid_ed25519\n",[228,906,907],{"class":230,"line":244},[228,908,241],{"emptyLinePlaceholder":240},[228,910,911],{"class":230,"line":250},[228,912,913],{},"ant trail deploy west         # builds on west, runs there\n",[228,915,916],{"class":230,"line":256},[228,917,918],{},"ant trail deploy east         # builds on east, runs there\n",[228,920,921],{"class":230,"line":262},[228,922,923],{},"ant trail status west\n",[228,925,926],{"class":230,"line":267},[228,927,928],{},"ant nest containers list --machine east\n",[190,930,931,932,935,936,938,939,942,943,217],{},"Each deploy builds on its own machine. To ship one build to both, push with a\nregistry (",[194,933,934],{},"ant haul --push"," with ",[194,937,674],{},") and deploy the same\n",[194,940,941],{},"--image"," on each machine. Branch and environment are part of every name, so\nthe two never collide. See ",[580,944,71],{"href":945},"\u002Fconcepts\u002Fconfiguration#deployment-overlays",[199,947,949],{"id":948},"database-access-via-a-tunnel","Database access via a tunnel",[190,951,952,955,956,959],{},[194,953,954],{},"ant nest tunnel"," forwards a local port to a container port on a machine over\niroh; nothing is exposed on the machine's network interfaces, and the listener\nis bound to ",[194,957,958],{},"127.0.0.1"," on your side.",[219,961,963],{"className":221,"code":962,"language":223,"meta":224,"style":224},"ant nest containers list --machine prod     # find the exact container name\nant nest tunnel --machine prod --container api-prod-db-1 --port 5432 --local 15432\n# Forwarding 127.0.0.1:15432 -> prod container api-prod-db-1:5432 over iroh; Ctrl-C to stop\n\n# in another shell:\npsql \"postgres:\u002F\u002Fapp:secret@127.0.0.1:15432\u002Fapp\"\n",[194,964,965,970,975,980,984,989],{"__ignoreMap":224},[228,966,967],{"class":230,"line":231},[228,968,969],{},"ant nest containers list --machine prod     # find the exact container name\n",[228,971,972],{"class":230,"line":237},[228,973,974],{},"ant nest tunnel --machine prod --container api-prod-db-1 --port 5432 --local 15432\n",[228,976,977],{"class":230,"line":244},[228,978,979],{},"# Forwarding 127.0.0.1:15432 -> prod container api-prod-db-1:5432 over iroh; Ctrl-C to stop\n",[228,981,982],{"class":230,"line":250},[228,983,241],{"emptyLinePlaceholder":240},[228,985,986],{"class":230,"line":256},[228,987,988],{},"# in another shell:\n",[228,990,991],{"class":230,"line":262},[228,992,993],{},"psql \"postgres:\u002F\u002Fapp:secret@127.0.0.1:15432\u002Fapp\"\n",[190,995,996,997,1001,1002,1005,1006,1008,1009,217],{},"Pass the ",[998,999,1000],"strong",{},"container"," port (",[194,1003,1004],{},"5432","), not a published host port, and only\nrunning, Ant-managed containers are valid targets. Opening a tunnel needs the\n",[194,1007,698],{}," capability on that machine. See ",[580,1010,115],{"href":116},[199,1012,1014],{"id":1013},"a-pre-built-image-from-ci","A pre-built image from CI",[190,1016,1017,1018,1021,1022,1024],{},"Create a one-time ",[194,1019,1020],{},"ci","-role account for the pipeline, store its exported bundle\nas a CI secret, and deploy the image the pipeline built. The full setup is in\n",[580,1023,110],{"href":111},"; the essence:",[219,1026,1028],{"className":221,"code":1027,"language":223,"meta":224,"style":224},"# once, on a machine you administer:\nant colony invite --role ci --machine prod\n\n# once, wherever you keep the pipeline's account:\nant colony signup --name ci\nant colony join --token \"$(cat invite.txt)\" --alias prod\nant colony export --out ant-ci.json      # store as the ANT_BUNDLE secret\n",[194,1029,1030,1035,1040,1044,1049,1054,1059],{"__ignoreMap":224},[228,1031,1032],{"class":230,"line":231},[228,1033,1034],{},"# once, on a machine you administer:\n",[228,1036,1037],{"class":230,"line":237},[228,1038,1039],{},"ant colony invite --role ci --machine prod\n",[228,1041,1042],{"class":230,"line":244},[228,1043,241],{"emptyLinePlaceholder":240},[228,1045,1046],{"class":230,"line":250},[228,1047,1048],{},"# once, wherever you keep the pipeline's account:\n",[228,1050,1051],{"class":230,"line":256},[228,1052,1053],{},"ant colony signup --name ci\n",[228,1055,1056],{"class":230,"line":262},[228,1057,1058],{},"ant colony join --token \"$(cat invite.txt)\" --alias prod\n",[228,1060,1061],{"class":230,"line":267},[228,1062,1063],{},"ant colony export --out ant-ci.json      # store as the ANT_BUNDLE secret\n",[219,1065,1067],{"className":363,"code":1066,"language":365,"meta":224,"style":224},"# .github\u002Fworkflows\u002Fdeploy.yml\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n    env:\n      ANT_MACHINE: prod\n      ANT_PASSPHRASE: ${{ secrets.ANT_PASSPHRASE }}\n    steps:\n      - name: Install ant\n        run: |\n          curl -fsSL https:\u002F\u002Fants-docs.pages.dev\u002Fdl\u002Finstall.sh | sh\n          echo \"$HOME\u002F.local\u002Fbin\" >> \"$GITHUB_PATH\"\n      - name: Sign in\n        env:\n          ANT_BUNDLE: ${{ secrets.ANT_BUNDLE }}\n        run: |\n          printf '%s' \"$ANT_BUNDLE\" > \u002Ftmp\u002Fant-ci.json\n          ant colony login --bundle \u002Ftmp\u002Fant-ci.json\n      - name: Register the machine\n        run: ant nest machines add prod --node-id \"${{ vars.ANT_MACHINE_NODE_ID }}\"\n      - name: Deploy\n        run: ant trail deploy --image ghcr.io\u002Forg\u002Fapp:\"$GITHUB_SHA\" --pull --json\n",[194,1068,1069,1074,1081,1088,1098,1105,1115,1125,1132,1144,1155,1160,1165,1176,1183,1193,1201,1206,1211,1223,1233,1245],{"__ignoreMap":224},[228,1070,1071],{"class":230,"line":231},[228,1072,1073],{"class":372},"# .github\u002Fworkflows\u002Fdeploy.yml\n",[228,1075,1076,1079],{"class":230,"line":237},[228,1077,1078],{"class":378},"jobs",[228,1080,383],{"class":382},[228,1082,1083,1086],{"class":230,"line":244},[228,1084,1085],{"class":378},"  deploy",[228,1087,383],{"class":382},[228,1089,1090,1093,1095],{"class":230,"line":250},[228,1091,1092],{"class":378},"    runs-on",[228,1094,398],{"class":382},[228,1096,1097],{"class":419}," ubuntu-latest\n",[228,1099,1100,1103],{"class":230,"line":256},[228,1101,1102],{"class":378},"    env",[228,1104,383],{"class":382},[228,1106,1107,1110,1112],{"class":230,"line":262},[228,1108,1109],{"class":378},"      ANT_MACHINE",[228,1111,398],{"class":382},[228,1113,1114],{"class":419}," prod\n",[228,1116,1117,1120,1122],{"class":230,"line":267},[228,1118,1119],{"class":378},"      ANT_PASSPHRASE",[228,1121,398],{"class":382},[228,1123,1124],{"class":419}," ${{ secrets.ANT_PASSPHRASE }}\n",[228,1126,1127,1130],{"class":230,"line":273},[228,1128,1129],{"class":378},"    steps",[228,1131,383],{"class":382},[228,1133,1134,1136,1139,1141],{"class":230,"line":279},[228,1135,520],{"class":382},[228,1137,1138],{"class":378}," name",[228,1140,398],{"class":382},[228,1142,1143],{"class":419}," Install ant\n",[228,1145,1146,1149,1151],{"class":230,"line":285},[228,1147,1148],{"class":378},"        run",[228,1150,398],{"class":382},[228,1152,1154],{"class":1153},"sVHd0"," |\n",[228,1156,1157],{"class":230,"line":291},[228,1158,1159],{"class":419},"          curl -fsSL https:\u002F\u002Fants-docs.pages.dev\u002Fdl\u002Finstall.sh | sh\n",[228,1161,1162],{"class":230,"line":297},[228,1163,1164],{"class":419},"          echo \"$HOME\u002F.local\u002Fbin\" >> \"$GITHUB_PATH\"\n",[228,1166,1167,1169,1171,1173],{"class":230,"line":303},[228,1168,520],{"class":382},[228,1170,1138],{"class":378},[228,1172,398],{"class":382},[228,1174,1175],{"class":419}," Sign in\n",[228,1177,1178,1181],{"class":230,"line":308},[228,1179,1180],{"class":378},"        env",[228,1182,383],{"class":382},[228,1184,1185,1188,1190],{"class":230,"line":313},[228,1186,1187],{"class":378},"          ANT_BUNDLE",[228,1189,398],{"class":382},[228,1191,1192],{"class":419}," ${{ secrets.ANT_BUNDLE }}\n",[228,1194,1195,1197,1199],{"class":230,"line":319},[228,1196,1148],{"class":378},[228,1198,398],{"class":382},[228,1200,1154],{"class":1153},[228,1202,1203],{"class":230,"line":325},[228,1204,1205],{"class":419},"          printf '%s' \"$ANT_BUNDLE\" > \u002Ftmp\u002Fant-ci.json\n",[228,1207,1208],{"class":230,"line":331},[228,1209,1210],{"class":419},"          ant colony login --bundle \u002Ftmp\u002Fant-ci.json\n",[228,1212,1214,1216,1218,1220],{"class":230,"line":1213},19,[228,1215,520],{"class":382},[228,1217,1138],{"class":378},[228,1219,398],{"class":382},[228,1221,1222],{"class":419}," Register the machine\n",[228,1224,1226,1228,1230],{"class":230,"line":1225},20,[228,1227,1148],{"class":378},[228,1229,398],{"class":382},[228,1231,1232],{"class":419}," ant nest machines add prod --node-id \"${{ vars.ANT_MACHINE_NODE_ID }}\"\n",[228,1234,1236,1238,1240,1242],{"class":230,"line":1235},21,[228,1237,520],{"class":382},[228,1239,1138],{"class":378},[228,1241,398],{"class":382},[228,1243,1244],{"class":419}," Deploy\n",[228,1246,1248,1250,1252],{"class":230,"line":1247},22,[228,1249,1148],{"class":378},[228,1251,398],{"class":382},[228,1253,1254],{"class":419}," ant trail deploy --image ghcr.io\u002Forg\u002Fapp:\"$GITHUB_SHA\" --pull --json\n",[190,1256,1257,1258,1261,1262,1264,1265,1267],{},"Split build and deploy when the build is slow: ",[194,1259,1260],{},"ant haul --push --release \"$GITHUB_SHA\""," in one job needs ",[194,1263,674],{}," and a registry password; the\ndeploy job then only runs the pushed image. A ",[194,1266,1020],{}," role can deploy and roll\nback, but cannot change the roster or read the audit log.",[199,1269,1271],{"id":1270},"a-staged-rollout-with-groups","A staged rollout with groups",[190,1273,1274,1275,1278,1279,1281,1282,1284],{},"A ",[998,1276,1277],{},"group"," gives the projects on one machine a shared docker network plus\nshared env, secrets, and base domains. It does not order the rollout: you\ndeploy stage by stage, and each member is staged and health-gated on a remote\nnest before it replaces the running release. Both projects target the machine\n(",[194,1280,585],{}," in each ",[194,1283,682],{},").",[219,1286,1288],{"className":221,"code":1287,"language":223,"meta":224,"style":224},"# once:\nant nest groups create backend --target-machine prod --domain example.com\nant nest groups add backend api worker    # sets group: backend in each project\n\n# stage 1: the API\ncd api\nant trail deploy prod          # stages the new container, then swaps\nant trail status prod\nant trail logs prod --tail 50\n\n# stage 2, once the API is verified: the worker\ncd ..\u002Fworker\nant trail deploy prod\n",[194,1289,1290,1295,1300,1305,1309,1314,1319,1324,1329,1334,1338,1343,1348],{"__ignoreMap":224},[228,1291,1292],{"class":230,"line":231},[228,1293,1294],{},"# once:\n",[228,1296,1297],{"class":230,"line":237},[228,1298,1299],{},"ant nest groups create backend --target-machine prod --domain example.com\n",[228,1301,1302],{"class":230,"line":244},[228,1303,1304],{},"ant nest groups add backend api worker    # sets group: backend in each project\n",[228,1306,1307],{"class":230,"line":250},[228,1308,241],{"emptyLinePlaceholder":240},[228,1310,1311],{"class":230,"line":256},[228,1312,1313],{},"# stage 1: the API\n",[228,1315,1316],{"class":230,"line":262},[228,1317,1318],{},"cd api\n",[228,1320,1321],{"class":230,"line":267},[228,1322,1323],{},"ant trail deploy prod          # stages the new container, then swaps\n",[228,1325,1326],{"class":230,"line":273},[228,1327,1328],{},"ant trail status prod\n",[228,1330,1331],{"class":230,"line":279},[228,1332,1333],{},"ant trail logs prod --tail 50\n",[228,1335,1336],{"class":230,"line":285},[228,1337,241],{"emptyLinePlaceholder":240},[228,1339,1340],{"class":230,"line":291},[228,1341,1342],{},"# stage 2, once the API is verified: the worker\n",[228,1344,1345],{"class":230,"line":297},[228,1346,1347],{},"cd ..\u002Fworker\n",[228,1349,1350],{"class":230,"line":303},[228,1351,1352],{},"ant trail deploy prod\n",[190,1354,1355,1356,1359,1360,1363,1364,1367,1368,1371,1372,1374,1375,217],{},"Members reach each other by container name on the group network, so the old\nand new stages can talk during the window. Give the remote projects a\n",[194,1357,1358],{},"zero_downtime: true"," and a ",[194,1361,1362],{},"health_check"," to make each swap and probe\nexplicit; blockers (a writable mount, ",[194,1365,1366],{},"container_name",", named read-write\nvolumes) fall back to a staged replace with a warning. Local members replace\nin place. For a remote compose or\nstack member, ",[194,1369,1370],{},"ant trail rollback"," re-applies the stored release record; for a\nlocal member or an older deploy, pin the previous release's images in the file\nand deploy again. See ",[580,1373,80],{"href":81}," and\n",[580,1376,105],{"href":1377},"\u002Fremote\u002Fdeploy#compose-and-stack-rollback",[199,1379,1381],{"id":1380},"next","Next",[1383,1384,1385,1390,1394],"ul",{},[1386,1387,1388],"li",{},[580,1389,165],{"href":166},[1386,1391,1392],{},[580,1393,105],{"href":106},[1386,1395,1396],{},[580,1397,71],{"href":72},[1399,1400,1401],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html pre.shiki code .sQzsp, html code.shiki .sQzsp{--shiki-light:#E53935;--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .srdBf, html code.shiki .srdBf{--shiki-light:#F76D47;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sVHd0, html code.shiki .sVHd0{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit}",{"title":224,"searchDepth":237,"depth":237,"links":1403},[1404,1405,1406,1407,1408,1409,1410,1411,1412],{"id":201,"depth":237,"text":202},{"id":352,"depth":237,"text":353},{"id":596,"depth":237,"text":597},{"id":667,"depth":237,"text":668},{"id":796,"depth":237,"text":797},{"id":948,"depth":237,"text":949},{"id":1013,"depth":237,"text":1014},{"id":1270,"depth":237,"text":1271},{"id":1380,"depth":237,"text":1381},"Copy-paste workflows for common shapes, from a static site to CI deploys.","md",null,{},{"icon":163},{"title":160,"description":1419},"Worked recipes: a static site, a compose stack with Postgres, domains through Caddy, private registry pulls, two machines, tunnels, CI, and staged rollouts.","kleyuJVXVyKbHU4_f4U8mTVSXpSq57Q2hbZMaMTiU2k",[1422,1424],{"title":150,"path":151,"stem":152,"description":1423,"icon":153,"children":-1},"What each run target supports today, locally and on a machine.",{"title":165,"path":166,"stem":167,"description":1425,"icon":168,"children":-1},"The common failures, what causes them, and the shortest fix.",1791938555036]