Managing multi-instance deployment

Explore the efficient deployment of multiple instances with Git integration

UI Bakery supports multi-instance deployment and synchronization. Key considerations include:

  • Apps must be connected to a Git repository and synchronized through it.

  • Data sources and roles used in the apps need to be manually synchronized.

This guide assumes the deployment of two UI Bakery instances in your setup, although it is applicable for multiple instances.

Data Sources consistency across instances

To synchronize your app and import it into another instance, ensure that the new instance has an identical list of data sources with the same IDs as the original instance. Follow these steps:

In the Original Instance:

  1. Locate the desired data source for synchronization.

  2. Copy its data source ID.

In the Second Instance:

  1. Start creating a new data source, entering the name and other required details.

  2. Click on the ID field to make it editable.

  3. Paste the copied data source ID from the first instance and click "Connect data source."

A data source ID can only be specified during the creation of the data source.

If you have existing data sources with different IDs, consider deleting them and creating new ones from scratch. Once the ID is correctly specified, the app will automatically start working with the new data source.

Roles consistency across instances

When using roles to manage page visibility, it is crucial to maintain identical role IDs across all instances. Follow these steps for effective synchronization:

In the Original Instance:

  1. Identify the role you wish to synchronize.

  2. Copy its role ID.

In Other Instances:

  1. Open the "Add Role" dialog.

  2. Enter the role name and set the permissions.

  3. Click on the ID field to make it editable.

  4. Paste the copied role ID from the first instance.

  5. Click "Create Role."

Contrary to data sources, role IDs can be modified for existing roles. This allows for the assignment of custom IDs to built-in roles like admin, user, and editor.

However, caution is advised when editing role IDs. Incorrect modifications can lead to pages not displaying properly within the app. It is generally recommended to avoid altering role IDs unless absolutely necessary.

Import an app from a Git repository

Once you have manually synchronized the Data Sources and roles, proceed to import your app using Git:

  • Upon app creation, choose Import from Git option.

  • Enter the Git repository URL.

  • Copy an SSH key suggested by UI Bakery and create a new key under the Deploy keys settings. Here's a guide on how to do this on GitHub:

    1. Open your repository settings and go to Deploy keys.

    2. Click Add deploy key and paste the key.

    3. Click Allow write access. - Click Add key.

  • Now the app is connected to the Git repository and can be pulled and deployed when new changes are available.

Keep data sources and user roles in sync when adding new ones

When developing a new feature, follow the guidelines here. Once the feature is deployed on the current instance and ready to roll out to another instance, pull the changes from the Git repository. If new user roles or data sources have been added to your instance, ensure they are in sync across all instances.

Last updated