How to reduce the number of deployments in monorepo?

We hooked up multiple apps on Qovery to a single monorepo. Now every merge to master triggers the deployment of all the apps. Even in a small team we were able to reach 100 deployment limit in 15 days and had to upgrade to a paid plan. This is going to create problems as we grow. Is there a way for Qovery to check if there were changes in the specified path before triggering deploy?

Also, I think you should reconsider your pricing. The current model motivates people to deploy less which doesn’t feel right. The per-user model most other services chose seems to make more sense.

You can indicate to Qovery what are the applications that must be redeployed when a file has been modified. Today, it’s only configurable via our API but it will be integrated into Qovery v3 (GA for September 2022).

Example

Here is an example of what you can do. Let’s say you have 2 applications:

  • app-1 and app-2 are in the same repository
  • app-1 is located in /app-1
  • app-2 is located in /app-2

What I want is:

  • If a file has been modified from /app-1/*, then only my App 1 on Qovery is redeployed.
  • If a file inside /app-2/* has been modified, then only my App 2 on Qovery is redeployed.

Get an API token

First, to get access to the API, generate an API token via the CLI with qovery token.

API requests

For app-1 we need to execute the following API query:

curl -X POST -H "Authorization: Token <your_api_token>" -d "{ \
  "mode": "MATCH", \
  "type": "PATH", \
  "value": "app-1/" \
}" https://api.qovery.com/application/:app-1-id/deploymentRestriction

For app-2 we need to execute the following API query:

curl -X POST -H "Authorization: Token <your_api_token>" -d "{ \
  "mode": "MATCH", \
  "type": "PATH", \
  "value": "app-2/" \
}" https://api.qovery.com/application/:app-2-id/deploymentRestriction

Please find the complete API documentation here.

That’s it! :slight_smile: Hope it helps.


We make generous annual plan with good discount - contact us via Intercom to get a quote.