Very often, before merging new changes to your production environment, you'd like to test them live in a deployed environment that resembles your production. Doing so allows you to make sure that everything works as expected before releasing new changes to your clients. Achieving it with Qovery is very simple and works well even if your project is made out of many applications, e.g. multiple backend services, websites, databases and so on.
Creating a staging environment
Create a new environment
- Add your applications
Choose your application names, git repositories, and branches you want to use for staging. You can set up the same environment as you use for production or use the clone functionality.
As you can see in the screenshots, we used
staging
branches for our applications in the staging environment. Applications in this environment will be deployed using source code fromstaging
branches. Add required services/databases
If your project requires databases, you can add them to your staging environment.
Set up secrets and environment variables
The last step you probably need to take is to set up another set of secrets and environment variables that are separate from your production. You can do it in your application
Environment Variables
section:Now, before merging new code to production, you can merge it first to your
staging
branch (or any other branch name you use for this purpose). New changes will be reflected in yourstaging
environment, which is separate from your production.After making sure new changes work well, all you need to do to release them to your clients is to update your production branch with the commits you tested in your staging environment.