Mono repository

How to deploy applications using Monorepository with Qovery

Qovery provides a very simple way of working with monorepositories. You can deploy multiple applications using the same git repository or deploy the same application in many different modes/configurations.

Deploying multiple applications using one repository

  1. Navigate to Console

  2. Create new applications or navigate to existing ones

  3. Navigate to application settings

    Monorepository

  4. To deploy multiple apps using one repository, set up the app to target your monorepo. Additionally, you need to set up the folder in which your application resides.

    First application

    Monorepository

    Second application

    Monorepository

    As you see in the examples above, we used one repository (poc-factory/tweetifier) in two applications:

    • timescale
    • core

    All we need to do to deploy multiple applications using one repository is:

    • Select the application name
    • Select our repository
    • Select the application root folder

    That's it. Using monorepositories with Qovery is that simple.

    Those applications may be a part of the same project or different projects; it's all up to you and your configuration.

Deploying application with multiple configurations using one repository

A special case of monorepository is a situation when one repository is used to deploy multiple applications with the same source code but different configurations or modes. Application behaviour depends on provided config, like environment variables and secrets.

Qovery supports this case well. The steps do not differ much from the steps from the previous example:

  1. Navigate to Console

  2. Create new applications or navigate to existing ones

  3. Navigate to application settings

    Monorepository

  4. Configure application repositories:

    First application

    Monorepository

    Second application

    Monorepository

  5. As you see in the examples above, we used one repository (poc-factory/tweetifier) in two applications:

    • app-1
    • app-2

    Those applications use the same application root path - /, so they can be build using the same source code. To adjust the behavior of applications to meet your needs, use environment variables or secrets. It allows you to run multiple applications using the same source code in different modes.

    You can set up secret or env variables in your application Environment Variables section:

    Monorepository

Q&A

Do you need more examples? Do you have any questions? Feel free to ask on our Community forum.