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 designed to simplify your deployments:

  • Deploy your application to production in just seconds with a simple git push.
  • Use your own domain name, with automatic HTTPS certificate setup for secure connections managed for you.
  • Take advantage of automatic backups, one-click updates, and predictable pricing, so you can focus on your code instead of infrastructure management.
  • Benefit from high performance and security on a private, dedicated infrastructure. Your environment is isolated and protected.

Save time and streamline your workflow: your code can be up and running with Stackhero's Python cloud hosting in just 5 minutes.

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> - Staging stack.

Follow these steps to set up a staging environment with Stackhero:

  1. On the Stackhero dashboard, rename your existing stack from <Project> to <Project> - Production. For example, if your project is called Chat Bot, the stack becomes Chat Bot - Production.
  2. Create a new stack named <Project> - Staging. For the Chat Bot project, the stack becomes Chat Bot - Staging.
  3. Start a Python service within the staging stack.
  4. Retrieve the git remote command 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.