Staging & going live
Staging and live environments: test, then go live
Every DployHub app has a free staging environment and a live one. Learn how deploys flow through staging and how Go live promotes the same image.
Updated 3 min read
Every app on DployHub comes with two environments: staging and live. Staging is where new versions land first so you can check them. Live is what your customers use. Each environment has its own address, its own environment variables and its own custom domain.
Addresses
When you name your app, it gets a slug, and the slug gives you two addresses:
live: https://<slug>.apps.dployhub.com
staging: https://<slug>-staging.apps.dployhub.comRenaming the app later keeps the same addresses. You can also attach your own domain to either environment, see Custom domains.
How a version reaches live
- 1
Deploy to staging
Every deploy, whether you click Deploy or push to GitHub, builds your code and releases it to staging.
- 2
Check it
Open the staging address, try the change, and look at the Logs tab if anything seems off.
- 3
Go live
Click Go live. We promote the exact image running on staging to live. There is no rebuild, so what you tested is exactly what customers get.
Going live is zero-downtime. The new container starts, we wait for it to answer on the health check path, then traffic switches and the old container is removed. If the new version does not come up, the current live version keeps serving.
If staging has nothing working yet, Go live shows: "Staging has no working version yet. Deploy to staging first, then go live."
Staging is free
Staging runs in a free, lightweight container with a fixed size of 0.25 vCPU, 256 MB memory and 1 GB storage. It is meant for checking changes, not for heavy load tests. You only pay for live, based on the resources you choose.
To save capacity, staging pauses after 7 days without a deploy and you get a "Staging stopped after a week idle" alert. Click Start to bring it back, or deploy again, which also restarts it and resets the 7-day clock. See Staging paused.
Separate settings per environment
- Environment variables are separate. Point staging at test services and live at production ones. Use Copy from staging when setting up live.
- Custom domains are separate, for example
staging.example.comandwww.example.com. - Storage is separate. Staging has its own 1 GB; it never touches live data.
- Restart, Stop and Start work per environment. A stopped live environment is not billed for the hours it is stopped.
Undoing a release
If a version you promoted causes trouble, you can roll back live to an earlier successful version in seconds from the Deployments tab.
Frequently asked questions
Does Go live rebuild my app?
No. It promotes the exact image already running on staging, so live gets what you tested.
Do I pay for staging?
No. Staging is free and has a fixed size of 0.25 vCPU, 256 MB and 1 GB.
Can live go up automatically?
Yes. Turn on auto go-live in Settings to promote after every successful staging deploy.
Related articles
- Roll back to a previous version in secondsUndo a bad release by rolling back to an earlier successful version from the Deployments tab. No rebuild, it takes seconds, and the last 5 images are kept.
- Auto-deploy on every git push from GitHubTurn on auto-deploy so every push to your GitHub branch builds and deploys to staging on DployHub, with the commit recorded for each deploy.
- Set environment variables for staging and liveAdd API keys, database URLs and other settings as environment variables on DployHub, separately for staging and live, and apply them with a redeploy.
- Staging paused or stopped: how to start it againStaging stopped after a week without deploys? Learn why free staging pauses on DployHub, how to start it in one click, and what it means for going live.
- Choose vCPU, memory and storage for your appPick vCPU, memory and storage for your live environment, see the monthly price before you commit, and change resources later with a quick restart.