[{"data":1,"prerenderedAt":488},["ShallowReactive",2],{"navigation":3,"page-\u002Fguides\u002Fcreate-a-staging-environment":213,"surround-\u002Fguides\u002Fcreate-a-staging-environment":485},[4,17,48,79,95,118,133,144,155,167,186],{"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":132,"exact":11},"Resources","\u002Fresources","4.resources\u002F1.index",[123,124,128],{"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","i-lucide-boxes",{"title":134,"icon":135,"path":136,"stem":137,"children":138,"page":143,"exact":11},"Configuration","i-lucide-sliders-horizontal","\u002Fconfiguration","5.configuration",[139],{"title":140,"path":141,"stem":142,"exact":11,"children":-1},"Environment variables","\u002Fconfiguration\u002Fvariables","5.configuration\u002F1.variables",false,{"title":145,"path":146,"stem":147,"children":148,"icon":154,"exact":11},"Networking","\u002Fnetworking","6.networking\u002F1.index",[149,150],{"title":145,"path":146,"stem":147,"exact":11,"children":-1},{"title":151,"path":152,"stem":153,"exact":11,"children":-1},"Reaching a database","\u002Fnetworking\u002Freaching-a-database","6.networking\u002F2.reaching-a-database","i-lucide-network",{"title":156,"path":157,"stem":158,"children":159,"icon":166,"exact":11},"Domains","\u002Fdomains","7.domains\u002F1.index",[160,162],{"title":161,"path":157,"stem":158,"exact":11,"children":-1},"Hostnames",{"title":163,"path":164,"stem":165,"exact":11,"children":-1},"Custom domains","\u002Fdomains\u002Fcustom-domains","7.domains\u002F2.custom-domains","i-lucide-globe",{"title":168,"path":169,"stem":170,"children":171,"icon":185,"exact":11},"Environments","\u002Fenvironments","8.environments\u002F1.index",[172,173,177,181],{"title":168,"path":169,"stem":170,"exact":11,"children":-1},{"title":174,"path":175,"stem":176,"exact":11,"children":-1},"Preview environments","\u002Fenvironments\u002Fpreview-environments","8.environments\u002F2.preview-environments",{"title":178,"path":179,"stem":180,"exact":11,"children":-1},"Named environments","\u002Fenvironments\u002Fnamed-environments","8.environments\u002F3.named-environments",{"title":182,"path":183,"stem":184,"exact":11,"children":-1},"Deleting an environment","\u002Fenvironments\u002Fdeleting-an-environment","8.environments\u002F4.deleting-an-environment","i-lucide-git-branch",{"title":187,"path":188,"stem":189,"children":190,"icon":212,"exact":11},"Guides","\u002Fguides","9.guides\u002F1.index",[191,192,196,200,204,208],{"title":187,"path":188,"stem":189,"exact":11,"children":-1},{"title":193,"path":194,"stem":195,"exact":11,"children":-1},"Deploy a Nuxt application","\u002Fguides\u002Fdeploy-a-nuxt-application","9.guides\u002F2.deploy-a-nuxt-application",{"title":197,"path":198,"stem":199,"exact":11,"children":-1},"Deploy a Next.js application","\u002Fguides\u002Fdeploy-a-nextjs-application","9.guides\u002F3.deploy-a-nextjs-application",{"title":201,"path":202,"stem":203,"exact":11,"children":-1},"Deploy an Express application","\u002Fguides\u002Fdeploy-an-express-application","9.guides\u002F4.deploy-an-express-application",{"title":205,"path":206,"stem":207,"exact":11,"children":-1},"Deploy with a Dockerfile","\u002Fguides\u002Fdeploy-with-a-dockerfile","9.guides\u002F5.deploy-with-a-dockerfile",{"title":209,"path":210,"stem":211,"exact":11,"children":-1},"Create a staging environment","\u002Fguides\u002Fcreate-a-staging-environment","9.guides\u002F6.create-a-staging-environment","i-lucide-map",{"id":214,"title":209,"badge":215,"body":216,"category":215,"description":479,"draft":143,"extension":480,"links":215,"meta":481,"navigation":11,"path":210,"seo":482,"sitemap":483,"stem":211,"__hash__":484},"docs\u002F9.guides\u002F6.create-a-staging-environment.md",null,{"type":217,"value":218,"toc":465},"minimark",[219,232,237,253,406,410,460],[220,221,222,223,227,228,231],"p",{},"By the end of this page the project has a ",[224,225,226],"code",{},"staging"," environment deploying the ",[224,229,230],{},"develop"," branch, with its own copy of the web service and its own database, reachable on its own hostname. Production is untouched.",[233,234,236],"h2",{"id":235},"before-you-begin","Before you begin",[238,239,240,244,250],"ul",{},[241,242,243],"li",{},"A project with a Production environment that deploys.",[241,245,246,247,249],{},"A ",[224,248,230],{}," branch in the repository. Kuppit checks that the branch exists before creating anything.",[241,251,252],{},"Room on the plan for one more named environment. Production and previews never count against it.",[254,255,257,262,270,274,301,304,308,325,340,347,351,371,375,380,384,394],"steps",{"level":256},"3",[258,259,261],"h3",{"id":260},"open-new-environment","Open New environment",[220,263,264,265,269],{},"In the project's navigation bar, open the environment selector and choose ",[266,267,268],"strong",{},"New environment",".",[258,271,273],{"id":272},"name-it-and-give-it-a-branch","Name it, and give it a branch",[220,275,276,277,279,280,283,284,287,288,279,290,293,294,297,298,269],{},"Enter ",[224,278,226],{}," as the ",[266,281,282],{},"Name",". The hint beneath says hostnames start with ",[224,285,286],{},"staging-","; the resources keep their names. Enter ",[224,289,230],{},[266,291,292],{},"Branch",". Leave ",[266,295,296],{},"Based on"," as ",[266,299,300],{},"Production",[220,302,303],{},"Kuppit computes the plan from Production as soon as the source is chosen, and draws the environment it would make.",[258,305,307],{"id":306},"decide-the-database","Decide the database",[220,309,310,311,313,314,317,318,321,322,324],{},"Under ",[266,312,119],{},", the ",[224,315,316],{},"web"," service offers ",[266,319,320],{},"New service",", already chosen: staging gets its own deployment of ",[224,323,230],{},", with Production's configuration copied across. That is right.",[220,326,327,328,331,332,335,336,339],{},"The ",[224,329,330],{},"database"," offers four choices. For staging, choose ",[266,333,334],{},"Clone the Production database"," where it is offered and recommended: an isolated copy of Production's data as of now, which makes staging behave like Production without touching it. If cloning is not available on this infrastructure, ",[266,337,338],{},"Create a new empty database"," is the recommended choice instead, and staging starts empty.",[220,341,342,343,346],{},"Do not choose ",[266,344,345],{},"Use the Production database"," for staging. It is the cheapest option and it is offered as that, but it means every write from staging changes Production's data; the amber warning says so when it is selected.",[258,348,350],{"id":349},"check-the-connection","Check the connection",[220,352,310,353,356,357,359,360,362,363,366,367,370],{},[266,354,355],{},"Connections",", ",[224,358,316],{}," → ",[224,361,330],{}," reads ",[266,364,365],{},"Connected automatically",": the reference ",[224,368,369],{},"${{ database.DATABASE_URL }}"," is re-created against staging's own database. Nothing to do.",[258,372,374],{"id":373},"choose-which-secrets-come-across","Choose which secrets come across",[220,376,310,377,379],{},[266,378,140],{},", every non-secret variable is copied. Secrets are listed by name with an unchecked box each. Tick the ones staging should carry, such as a third-party API key that is safe to share between the two, and leave the rest; you set those on staging afterwards. No value appears on the page.",[258,381,383],{"id":382},"create-it","Create it",[220,385,386,387,390,391,269],{},"The summary beside the plan lists the name, the branch, the source, each resource with its decision, and ",[266,388,389],{},"Estimated impact: Adds usage",", because a service and a database are being created. Choose ",[266,392,393],{},"Create environment",[220,395,396,397,399,400,402,403,269],{},"Kuppit creates the environment, its resources and its hostname in one step, then starts a deployment of ",[224,398,230],{}," for the service. The project opens on ",[224,401,226],{},"; the service's hostname is ",[224,404,405],{},"staging-\u003Cproject>-\u003Cid>.kuppit.app",[233,407,409],{"id":408},"afterwards","Afterwards",[238,411,412,424,432,441,450],{},[241,413,414,417,418,420,421,269],{},[266,415,416],{},"Set the secrets you withheld"," on staging's service ",[266,419,24],{}," tab, then ",[266,422,423],{},"Redeploy now",[241,425,426,431],{},[266,427,428,429,269],{},"Push to ",[224,430,230],{}," Every push deploys staging's service, exactly as pushes to the production branch deploy Production.",[241,433,434,437,438,440],{},[266,435,436],{},"Staging's variables"," live on its own ",[266,439,24],{}," tab. Anything every service in staging should read goes there; a service's own variable of the same name wins.",[241,442,443,449],{},[266,444,445,446,448],{},"Merging ",[224,447,230],{}," into the production branch"," is how staging's changes reach Production. There is no promote button; the branch is the promotion.",[241,451,452,455,456,269],{},[266,453,454],{},"Deleting staging"," destroys its service and its database, with all of its data. Production's database is untouched, because staging had its own. See ",[457,458,459],"a",{"href":183},"deleting an environment",[220,461,462,464],{},[457,463,178],{"href":179}," has the full account of every choice on the plan.",{"title":466,"searchDepth":467,"depth":467,"links":468},"",3,[469,478],{"id":235,"depth":470,"text":236,"children":471},2,[472,473,474,475,476,477],{"id":260,"depth":467,"text":261},{"id":272,"depth":467,"text":273},{"id":306,"depth":467,"text":307},{"id":349,"depth":467,"text":350},{"id":373,"depth":467,"text":374},{"id":382,"depth":467,"text":383},{"id":408,"depth":470,"text":409},"A long-lived copy of Production on its own branch, with its own database, that deploys on every push to develop.","md",{},{"title":209,"description":479},{"loc":210},"0Hu71zK8O_EIhl9wBsPejdux8fsQU23k8CHQ3yQCVNs",[486,215],{"title":205,"path":206,"stem":207,"description":487,"children":-1},"Any language, any runtime. Kuppit builds your Dockerfile as written, caches its layers, and routes to port 8080.",1788549618290]