Ruby: 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 Ruby deployments.
👋 Welcome to the Stackhero documentation!
Stackhero offers a ready-to-use Ruby 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 Ruby cloud hosting solution!
A staging environment is a best practice to use alongside your development and production environments. It replicates your production environment so you can test updates and changes before they go live.
A staging environment must closely mirror the production environment.
However, ensure that the staging environment uses a clone of the production database rather than the actual production database.
If your Ruby service is linked to a database or other services, recreate them in the new
<Project> - Stagingstack.
To set up a staging environment on Stackhero, follow these steps:
- On the Stackhero dashboard, rename your existing stack from
<Project>to<Project> - Production. For example, if your project is calledChat Bot, rename the stack toChat Bot - Production. - Create a new stack called
<Project> - Staging. Using the previous example, this would beChat Bot - Staging. - Start a Ruby service within the staging stack.
- Retrieve the value of the
git remotecommand and follow the instructions in the Deploying to staging environment section.
Following these steps will give you a properly configured staging environment to test and verify updates before they reach production.