Environments and branches

Is it possible to restrict the production environment to just the 'main' branch?

We're evaluating using retool with source control. We have successfully linked our instance to github. We want to be able to restrict the production environment so that it will only run with the 'main' branch from source control.

The reason for this, is that we want to avoid the possibility of untested versions of apps (on the dev branches) being run in the production environment. It seems that a developer editing or previewing their feature branch version of an app, can run that app against the production environment. We cant' see a simple way of preventing that at the moment.

Hi @SteveM, welcome to the forum! :wave:

The best approach for your use case is to implement a Multi-instance deployment.

It's all about Resource configuration. Each Retool instance will have a "production" environment. However, on the second Retool instance (dev), we'll configure the resources to read/write to your resources' development environment.

Although in the UI both Retool instances will say "production," they will be pointing to two different environments at the resource level.

From the doc linked above::