Improving Review Apps: Container Formation

November 24, 2017 - 4 min read
Improving Review Apps: Container Formation

Exactly one year ago, we released a deep and powerful GitHub integration: Review Apps. They let you create temporary testing environments based on the GitHub Flow. When a Pull Request is created a whole new copy of an app environment is created and deployed. Once the pull request is merged or closed, this application is deleted automatically.

Adding the ability to define the container formation

One limit of the Review Apps was that they were started with one single web container of size M like any new application on Scalingo. This was problematic for users who desire to copy exactly their production environment in their Review Apps without having to execute any manual action.

This issue is now solved, you can define the number of containers of each type you want to be started when a Review App is created. This is done by creating/modifying the scalingo.json manifest file at the root of your project.

Manifest Format: Container Formation

Here is an example of what the formation in a scalingo.json looks like:

{
  "formation": {
    "web": {
      "amount": 2,
      "size": "L"
    },
    "worker": {
      "amount": 1,
      "size": "XL"
    }
  }
}

In this case, each review app will be started with 2 web containers of size L and one worker container of size XL.

Other Usage: One-click Deploy Applications

This manifest is also used to define how applications deployed with our one-click button are deployed. These projects were impacted by the same limitation, for instance the decentralized micro-blogging Mastodon requires a worker container to be running to handle asynchronous tasks. This container was not started by default, now it will be, improving the experience for new users of the project.

By the way, if you have a trendy open-source project hosted on GitHub you can let your testers and users deploy their own instance on Scalingo with a single click just by adding this button, here is the documentation.

Share the article
Étienne Michon
Étienne Michon
Étienne Michon is one of the first employee at Scalingo. With a PhD in computer science Étienne takes care of Research and Development at Scalingo. He also regularly contributes to this blog with technical articles.

Try Scalingo for free

30-day free trial / No credit card required / Hosted in Europe