Deploying to multiple environments through multiple branches
Being able to deploy to a single production environment is valuable, but in order to support development and testing, it is useful to have at least one other environment other than the production environment to test with. That way, people testing the software who do not have a development environment can see the effect of changes you make, without you having to deploy them to the production environment.
In the next part of the chapter, we are going to create a second environment, a staging environment, to allow us to test changes before they are in production.
Creating a staging environment
You will need another host, similar in specifications to the one running the production environment, for the staging environment. Once you can SSH to that host, you could follow the instructions in the previous chapter about installing Docker and Git. Assuming you are running on CentOS 7, you can use the following script snippet...