Skip to content

Multiple Environments

Environments are like Content branches: separate repositories that keep content for different environments isolated. You can create them from the React Bricks Dashboard.

Environments can be useful in scenarios such as:

  • Creating a development environment where developers can experiment with content while building new bricks. You can then sync the main environment’s content back to the development one when needed.
  • Working on a v2 of your website while maintaining v1. When ready, you can push the content to the main branch.
  • Maintaining a backup of an older version of the website content for future use (e.g., creating a branch for Black Friday promotions, then easily reverting to the “normal” content).

Each environment has its own content, users, build hooks, languages, and change history.

How to Use Environments

  1. Create and manage environments from the Dashboard
  2. Use the environment property on the React Bricks configuration to select the working environment for a project.

Creating a new Environment

  • When you create a new environment, it inherits all content and configuration from the “main” environment.
  • You can then modify both the content and other properties of the new environment (e.g., removing existing users or inviting new ones).

Sync and Push Operations

  • The “sync” operation updates an environment with the main environment’s content, overwriting the environment’s content.
  • The “push” operation transfers an environment’s content to the main environment, overwriting the main environment’s content.