Manage multi-instance deployment
Explore the efficient deployment of multiple instances with Git integration
Last updated
Explore the efficient deployment of multiple instances with Git integration
Last updated
© 2024 UI Bakery
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.
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:
Locate the desired data source for synchronization.
Copy its data source ID.
In the Second Instance:
Start creating a new data source, entering the name and other required details.
Click on the ID field to make it editable.
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.
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:
Identify the role you wish to synchronize.
Copy its role ID.
In Other Instances:
Open the "Add Role" dialog.
Enter the role name and set the permissions.
Click on the ID field to make it editable.
Paste the copied role ID from the first instance.
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.
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:
Open your repository settings and go to Deploy keys.
Click Add deploy key and paste the key.
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.
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.