Seed supports monorepo Serverless Framework apps. By default, all the services in a monorepo app are deployed concurrently. This means that a new git commit triggers a deployment to all the services in the monorepo app at the same time.
However, there are cases where some services in your monorepo app are dependent on the others. This can happen when you have an infrastructure specific service (that creates your DynamoDB tables) that need to be deployed before your APIs. To do this, Seed gives you a very convenient way to configure your deployment workflow into phases.
Seed has a concept of deployment phases. By default, all your services are deployed concurrently in a single phase. But you can configure these by hitting Manage Deploy Phases from your app settings.
Here you’ll be able to manage the deployment phases for your app.
To add a phase, simply hit the Add a Phase button
And select the service you want deployed in this phase.
And hit Update Phases.
Also, if you wanted to add the service back to Phase 1, you can just select it from the dropdown in Phase 1.
Finally, if you want to run integration tests or a script after all your deploy phases complete; you can add a post-deploy phase.
With these changes, any new deployment will use the phases configured above as a part of the workflow.
This means that the service in the second phase will wait for the ones in the first ones to complete.
And that’s it. With Deploy Phases you can now manage the dependencies in your services to make sure that they are always deployed in order.