How to manage application dependency on deployment

Hi @emmanuelcohenlaroque,

This case is already handled by Qovery. All databases are always started before the applications when you deploy your environment.

Qovery lets you manage the deployment order between your apps within the same environment. At the moment it’s not yet available via the web console (it will be in Q4 2022), but you can manage it via our API.

Example

Let’s say you have a Database, a Backend, and a Frontend. The backend depends on your database, the frontend depends on the backend. Then you must start the Database, then the Backend, then the Frontend.

Qovery:

  1. Always start databases first
  2. Determine the deployment order based on the dependency you set between your apps.

Here are the API commands to make your Backend app depending on the frontend:

curl -X POST -H 'Authorization: Token <Your Qovery API Token>' \
https://api.qovery.com/application/{backendId}/dependency/{frontendId}

That’s it! You can now deploy your environment and you will see that the Backend app always starts before the Frontend app.

1 Like