Creating a new environment
Based on what we have seen so far, in order to create a new environment, all we need to do is the following:
- Define a new configuration file.
- Create a new front controller for it (in case we need to call it explicitly).
To put it in practice, let's imagine that your web application was successful enough to receive sign ups from all around the world. This means that it is wise to use regional servers for each country instead of serving everyone in the world with the same server.
One way to do this is to define different domains for different regions. Again, the code base stays the same, but configurations for the database, caching, and so on should be different. However, because we (as developers) are working from one specific address and need to find a way to Dev/Test the code from our own location, we can have a front controller for that specific region to see how it works.
Let's create the new config file and save it under the name, config_region2.yml
,...