Python: Setting up a staging environment
This documentation is part of the Advanced usages guide. You can view the complete guide here: Going further with your Python deployments.
👋 Welcome to the Stackhero documentation!
Stackhero offers a ready-to-use Python cloud solution that provides a host of benefits, including:
- Deploy your application in seconds with a simple
git push.- Use your own domain name and benefit from the automatic configuration of HTTPS certificates for enhanced security.
- Enjoy peace of mind with automatic backups, one-click updates, and straightforward, transparent, and predictable pricing.
- Get optimal performance and robust security thanks to a private and dedicated VM.
Save time and simplify your life: it only takes 5 minutes to try Stackhero's Python cloud hosting solution!
A staging environment is a best practice when used alongside development and production environments. It replicates the production environment so that you can test updates and changes before going live, reducing the risk of issues in production.
A staging environment must closely mirror the production environment.
However, it should use a cloned version of your production database or connected services rather than the live production database.
If your Python service depends on databases or other services, recreate them in a new
<Project> - Stagingstack.
Follow these steps to set up a staging environment with Stackhero:
- On the Stackhero dashboard, rename your existing stack from
<Project>to<Project> - Production. For example, if your project is calledChat Bot, the stack becomesChat Bot - Production. - Create a new stack named
<Project> - Staging. For theChat Botproject, the stack becomesChat Bot - Staging. - Start a Python service within the staging stack.
- Retrieve the
git remotecommand and follow the instructions in the Deploying to staging environment documentation.
This configuration ensures you have a fully functional staging environment for testing updates before production deployment.