[{"data":1,"prerenderedAt":508},["ShallowReactive",2],{"navigation":3,"page-\u002Fconfiguration\u002Fconnections":221,"surround-\u002Fconfiguration\u002Fconnections":503},[4,17,48,79,95,118,137,152,163,175,194],{"title":5,"path":6,"stem":7,"children":8,"icon":16,"exact":11},"Getting started","\u002Fgetting-started","1.getting-started\u002F1.index",[9,12],{"title":10,"path":6,"stem":7,"exact":11,"children":-1},"Introduction",true,{"title":13,"path":14,"stem":15,"exact":11,"children":-1},"Quickstart","\u002Fgetting-started\u002Fquickstart","1.getting-started\u002F2.quickstart","i-lucide-rocket",{"title":18,"path":19,"stem":20,"children":21,"icon":47,"exact":11},"Reference","\u002Freference","10.reference\u002F1.index",[22,23,27,31,35,39,43],{"title":18,"path":19,"stem":20,"exact":11,"children":-1},{"title":24,"path":25,"stem":26,"exact":11,"children":-1},"Variables","\u002Freference\u002Fvariables","10.reference\u002F2.variables",{"title":28,"path":29,"stem":30,"exact":11,"children":-1},"Hostnames and DNS","\u002Freference\u002Fhostnames-and-dns","10.reference\u002F3.hostnames-and-dns",{"title":32,"path":33,"stem":34,"exact":11,"children":-1},"Statuses","\u002Freference\u002Fstatuses","10.reference\u002F4.statuses",{"title":36,"path":37,"stem":38,"exact":11,"children":-1},"Limits","\u002Freference\u002Flimits","10.reference\u002F5.limits",{"title":40,"path":41,"stem":42,"exact":11,"children":-1},"Sizes","\u002Freference\u002Fsizes","10.reference\u002F6.sizes",{"title":44,"path":45,"stem":46,"exact":11,"children":-1},"The GitHub App","\u002Freference\u002Fgithub-app","10.reference\u002F7.github-app","i-lucide-book-open",{"title":49,"path":50,"stem":51,"children":52,"icon":78,"exact":11},"Troubleshooting","\u002Ftroubleshooting","11.troubleshooting\u002F1.index",[53,54,58,62,66,70,74],{"title":49,"path":50,"stem":51,"exact":11,"children":-1},{"title":55,"path":56,"stem":57,"exact":11,"children":-1},"Build failures","\u002Ftroubleshooting\u002Fbuild-failures","11.troubleshooting\u002F2.build-failures",{"title":59,"path":60,"stem":61,"exact":11,"children":-1},"Start and health failures","\u002Ftroubleshooting\u002Fstart-and-health-failures","11.troubleshooting\u002F3.start-and-health-failures",{"title":63,"path":64,"stem":65,"exact":11,"children":-1},"Reference failures","\u002Ftroubleshooting\u002Freference-failures","11.troubleshooting\u002F4.reference-failures",{"title":67,"path":68,"stem":69,"exact":11,"children":-1},"Failures that are Kuppit's","\u002Ftroubleshooting\u002Ffailures-that-are-kuppits","11.troubleshooting\u002F5.failures-that-are-kuppits",{"title":71,"path":72,"stem":73,"exact":11,"children":-1},"Domain issues","\u002Ftroubleshooting\u002Fdomain-issues","11.troubleshooting\u002F6.domain-issues",{"title":75,"path":76,"stem":77,"exact":11,"children":-1},"No preview for a pull request","\u002Ftroubleshooting\u002Fno-preview-for-a-pull-request","11.troubleshooting\u002F7.no-preview-for-a-pull-request","i-lucide-life-buoy",{"title":80,"path":81,"stem":82,"children":83,"icon":94,"exact":11},"Concepts","\u002Fconcepts","2.concepts\u002F1.index",[84,86,90],{"title":85,"path":81,"stem":82,"exact":11,"children":-1},"The Kuppit model",{"title":87,"path":88,"stem":89,"exact":11,"children":-1},"The application graph","\u002Fconcepts\u002Fthe-application-graph","2.concepts\u002F2.the-application-graph",{"title":91,"path":92,"stem":93,"exact":11,"children":-1},"How a service runs","\u002Fconcepts\u002Fhow-a-service-runs","2.concepts\u002F3.how-a-service-runs","i-lucide-shapes",{"title":96,"path":97,"stem":98,"children":99,"icon":117,"exact":11},"Deployments","\u002Fdeployments","3.deployments\u002F1.index",[100,101,105,109,113],{"title":96,"path":97,"stem":98,"exact":11,"children":-1},{"title":102,"path":103,"stem":104,"exact":11,"children":-1},"Builds","\u002Fdeployments\u002Fbuilds","3.deployments\u002F2.builds",{"title":106,"path":107,"stem":108,"exact":11,"children":-1},"Redeploy and roll back","\u002Fdeployments\u002Fredeploy-and-rollback","3.deployments\u002F3.redeploy-and-rollback",{"title":110,"path":111,"stem":112,"exact":11,"children":-1},"Logs","\u002Fdeployments\u002Flogs","3.deployments\u002F4.logs",{"title":114,"path":115,"stem":116,"exact":11,"children":-1},"When a deployment fails","\u002Fdeployments\u002Fwhen-a-deployment-fails","3.deployments\u002F5.when-a-deployment-fails","i-lucide-cloud-upload",{"title":119,"path":120,"stem":121,"children":122,"icon":136,"exact":11},"Resources","\u002Fresources","4.resources\u002F1.index",[123,124,128,132],{"title":119,"path":120,"stem":121,"exact":11,"children":-1},{"title":125,"path":126,"stem":127,"exact":11,"children":-1},"Web services","\u002Fresources\u002Fweb-services","4.resources\u002F2.web-services",{"title":129,"path":130,"stem":131,"exact":11,"children":-1},"PostgreSQL","\u002Fresources\u002Fpostgresql","4.resources\u002F3.postgresql",{"title":133,"path":134,"stem":135,"exact":11,"children":-1},"Workers","\u002Fresources\u002Fworkers","4.resources\u002F4.workers","i-lucide-boxes",{"title":138,"icon":139,"path":140,"stem":141,"children":142,"page":151,"exact":11},"Configuration","i-lucide-sliders-horizontal","\u002Fconfiguration","5.configuration",[143,147],{"title":144,"path":145,"stem":146,"exact":11,"children":-1},"Environment variables","\u002Fconfiguration\u002Fvariables","5.configuration\u002F1.variables",{"title":148,"path":149,"stem":150,"exact":11,"children":-1},"Connections","\u002Fconfiguration\u002Fconnections","5.configuration\u002F2.connections",false,{"title":153,"path":154,"stem":155,"children":156,"icon":162,"exact":11},"Networking","\u002Fnetworking","6.networking\u002F1.index",[157,158],{"title":153,"path":154,"stem":155,"exact":11,"children":-1},{"title":159,"path":160,"stem":161,"exact":11,"children":-1},"Reaching a database","\u002Fnetworking\u002Freaching-a-database","6.networking\u002F2.reaching-a-database","i-lucide-network",{"title":164,"path":165,"stem":166,"children":167,"icon":174,"exact":11},"Domains","\u002Fdomains","7.domains\u002F1.index",[168,170],{"title":169,"path":165,"stem":166,"exact":11,"children":-1},"Hostnames",{"title":171,"path":172,"stem":173,"exact":11,"children":-1},"Custom domains","\u002Fdomains\u002Fcustom-domains","7.domains\u002F2.custom-domains","i-lucide-globe",{"title":176,"path":177,"stem":178,"children":179,"icon":193,"exact":11},"Environments","\u002Fenvironments","8.environments\u002F1.index",[180,181,185,189],{"title":176,"path":177,"stem":178,"exact":11,"children":-1},{"title":182,"path":183,"stem":184,"exact":11,"children":-1},"Preview environments","\u002Fenvironments\u002Fpreview-environments","8.environments\u002F2.preview-environments",{"title":186,"path":187,"stem":188,"exact":11,"children":-1},"Named environments","\u002Fenvironments\u002Fnamed-environments","8.environments\u002F3.named-environments",{"title":190,"path":191,"stem":192,"exact":11,"children":-1},"Deleting an environment","\u002Fenvironments\u002Fdeleting-an-environment","8.environments\u002F4.deleting-an-environment","i-lucide-git-branch",{"title":195,"path":196,"stem":197,"children":198,"icon":220,"exact":11},"Guides","\u002Fguides","9.guides\u002F1.index",[199,200,204,208,212,216],{"title":195,"path":196,"stem":197,"exact":11,"children":-1},{"title":201,"path":202,"stem":203,"exact":11,"children":-1},"Deploy a Nuxt application","\u002Fguides\u002Fdeploy-a-nuxt-application","9.guides\u002F2.deploy-a-nuxt-application",{"title":205,"path":206,"stem":207,"exact":11,"children":-1},"Deploy a Next.js application","\u002Fguides\u002Fdeploy-a-nextjs-application","9.guides\u002F3.deploy-a-nextjs-application",{"title":209,"path":210,"stem":211,"exact":11,"children":-1},"Deploy an Express application","\u002Fguides\u002Fdeploy-an-express-application","9.guides\u002F4.deploy-an-express-application",{"title":213,"path":214,"stem":215,"exact":11,"children":-1},"Deploy with a Dockerfile","\u002Fguides\u002Fdeploy-with-a-dockerfile","9.guides\u002F5.deploy-with-a-dockerfile",{"title":217,"path":218,"stem":219,"exact":11,"children":-1},"Create a staging environment","\u002Fguides\u002Fcreate-a-staging-environment","9.guides\u002F6.create-a-staging-environment","i-lucide-map",{"id":222,"title":148,"badge":223,"body":224,"category":223,"description":497,"draft":151,"extension":498,"links":223,"meta":499,"navigation":11,"path":149,"seo":500,"sitemap":501,"stem":150,"__hash__":502},"docs\u002F5.configuration\u002F2.connections.md",null,{"type":225,"value":226,"toc":485},"minimark",[227,240,252,257,263,285,294,298,301,385,399,411,417,421,431,437,441,455,459,462,466,473,477],[228,229,230,231,235,236,239],"p",{},"A connection is a service depending on a database, made as one thing: ",[232,233,234],"code",{},"web"," → ",[232,237,238],{},"database",". Instead of adding a reference variable for each value the database exposes, you connect the service to the database and Kuppit injects every variable the database exposes, under the names the database uses. The connection then owns those variables. Renaming one, pointing the connection at a different database, or removing it are done on the connection, and the variables follow.",[228,241,242,243,247,248,251],{},"A connection is made on the project's ",[244,245,246],"strong",{},"Overview",", between a service and a database in the same environment. Right-click the service, or open the ellipsis on its card or its panel, choose ",[244,249,250],{},"Connect to…",", then the database. A database the service is already connected to is not offered again. The connection appears as a line between the two; select the line to see what it injects, and to change it.",[253,254,256],"h2",{"id":255},"changing-a-connection","Changing a connection",[228,258,259,260,262],{},"Select the connection's line on the ",[244,261,246],{},". Its panel lists every variable it injects and offers three changes:",[264,265,266,273,279],"ul",{},[267,268,269,272],"li",{},[244,270,271],{},"Rename"," an injected variable with the pencil beside it. The new name must be free on the service.",[267,274,275,278],{},[244,276,277],{},"Change target"," to another database beside the service — a database this environment shares from another appears here too, named for where it comes from. Every injected variable moves at once. The new target must expose everything the connection injects.",[267,280,281,284],{},[244,282,283],{},"Disconnect"," removes the connection and every variable it injected.",[228,286,287,288,293],{},"Changing the target and disconnecting ask first, and say what changes; a rename applies at once. None of them touches the running deployment; see ",[289,290,292],"a",{"href":291},"#when-a-change-takes-effect","when a change takes effect",".",[253,295,297],{"id":296},"what-a-connection-injects","What a connection injects",[228,299,300],{},"A connection injects the variables its target exposes. For PostgreSQL that is:",[302,303,304,317],"table",{},[305,306,307],"thead",{},[308,309,310,314],"tr",{},[311,312,313],"th",{},"Variable",[311,315,316],{},"Secret",[318,319,320,330,339,348,358,367,376],"tbody",{},[308,321,322,328],{},[323,324,325],"td",{},[232,326,327],{},"PGHOST",[323,329],{},[308,331,332,337],{},[323,333,334],{},[232,335,336],{},"PGPORT",[323,338],{},[308,340,341,346],{},[323,342,343],{},[232,344,345],{},"PGUSER",[323,347],{},[308,349,350,355],{},[323,351,352],{},[232,353,354],{},"PGPASSWORD",[323,356,357],{},"Yes",[308,359,360,365],{},[323,361,362],{},[232,363,364],{},"PGDATABASE",[323,366],{},[308,368,369,374],{},[323,370,371],{},[232,372,373],{},"PGSSLMODE",[323,375],{},[308,377,378,383],{},[323,379,380],{},[232,381,382],{},"DATABASE_URL",[323,384,357],{},[228,386,387,388,392,393,395,396,398],{},"Each is injected as a ",[289,389,391],{"href":390},"\u002Fconfiguration\u002Fvariables#literals-and-references","reference",": the service stores the pointer, and the value is composed when a deployment is prepared, from the database as it is then. Secrecy follows the variable being referenced. ",[232,394,354],{}," and ",[232,397,382],{}," are secrets whatever the service calls them.",[228,400,401,402,405,406,408,409,293],{},"Every variable is injected under its own name, unless that name is already taken on the service (below). To give one another name afterwards, rename it on the connection: a service that reads ",[232,403,404],{},"DB_URL"," can receive ",[232,407,382],{}," as ",[232,410,404],{},[228,412,413,414,416],{},"A name the service already uses is never taken over. If the service already has a variable called ",[232,415,327],{},", whether a literal or a reference you wrote, the connection is not made under that name: the panel lists every variable the connection would inject, points out the names the service already uses, and asks what to call each. Give those other names, or rename the existing variable first.",[253,418,420],{"id":419},"on-the-variables-tab","On the Variables tab",[228,422,423,424,426,427,430],{},"The variables a connection injects appear on the service's ",[244,425,24],{}," tab like any other reference, marked ",[244,428,429],{},"Connection",", with a line saying which connection manages them. They cannot be edited or deleted there; they are changed on the connection, as above.",[228,432,433,434,436],{},"A reference you wrote by hand to the same database is not part of the connection. It stays where it is when the connection changes or is removed, and it is still edited on the ",[244,435,24],{}," tab.",[253,438,440],{"id":439},"when-a-change-takes-effect","When a change takes effect",[228,442,443,444,447,448,451,452,293],{},"A connection changes the service's variables, and a variable change never touches the running deployment. The service shows ",[244,445,446],{},"Runtime configuration has changed","; choose ",[244,449,450],{},"Redeploy now",", or wait for the next push. See ",[289,453,292],{"href":454},"\u002Fconfiguration\u002Fvariables#when-a-change-takes-effect",[253,456,458],{"id":457},"deleting-either-end","Deleting either end",[228,460,461],{},"Deleting the database removes the connection and every variable it injected, exactly as it removes references written by hand. Kuppit names each connected service before you confirm. Deleting the service takes its connections with it and leaves the database untouched.",[253,463,465],{"id":464},"in-a-new-environment","In a new environment",[228,467,468,469,472],{},"When a ",[289,470,471],{"href":187},"named environment"," is created from another, a connection comes across as a connection, against whatever the new environment provides for the database: the new copy, the clone, or the shared instance. A connection to a component the new environment leaves out is dropped, with the variables it would have injected.",[253,474,476],{"id":475},"where-a-connection-can-point","Where a connection can point",[228,478,479,480,484],{},"A connection targets a resource in the same environment as the service, like any reference. To depend on another environment's database, ",[289,481,483],{"href":482},"\u002Fenvironments\u002Fnamed-environments#connections","share"," it into this environment first; a connection to the shared database is then a connection like any other.",{"title":486,"searchDepth":487,"depth":487,"links":488},"",3,[489,491,492,493,494,495,496],{"id":255,"depth":490,"text":256},2,{"id":296,"depth":490,"text":297},{"id":419,"depth":490,"text":420},{"id":439,"depth":490,"text":440},{"id":457,"depth":490,"text":458},{"id":464,"depth":490,"text":465},{"id":475,"depth":490,"text":476},"Connect a service to a database as one act. A connection injects the database's variables into the service, owns them, and is where they are renamed, re-pointed or removed.","md",{},{"title":148,"description":497},{"loc":149},"ofnaDezj1JP2AmcX8umlV2b5hCWDC7uJaYd8Ors8C4g",[504,506],{"title":144,"path":145,"stem":146,"description":505,"children":-1},"How variables are set on services and environments, how references connect resources, and how secrets are handled.",{"title":153,"path":154,"stem":155,"description":507,"children":-1},"How a request reaches your service, what Kuppit's edge does to it on the way, how services reach each other, and what is not there.",1788920363365]