Environments

After you install for the first time, a local development environment is created for you, with a temporary pre-deploy-to-production branch (more on branches later).

Your first objective should be to deploy to production.

Deploying to Production

Forest Admin is meant to help you manage your operations: this can only happen if you work with your Production data! To do so, you need to create your Production environment.

Click "Deploy to production" on the top banner or in the Environments tab of your Project settings.

Deploy your agent

In the first step, you need to input your agent's URL. This is the URL of the server onto which you have deployed (or will soon deploy) your agent's code base:

If you need help deploying your agent's codebase, here are step-by-step guides showing how it can be done on Heroku, on Google Cloud Platform, or on a standard ubuntu server.

Note that for security reasons, your agent must use the HTTPS protocol.

The URL must not end with a trailing /.

Connect to your database

In the next step, you need to fill out your Production database credentials:

Your database credentials never leave your browser and are solely used to generate environment variables on the next step, so they are never exposed.

Set your environment variables

The final step requires that you add environment variables to your server. Follow the on-screen instructions:

Once your node server is successfully detected and running with the indicated environment variables, a "Finish" button will appear. Click on it to finalize the creation of your Production environment.

Creating a remote environment

Now that your admin panel is live in production, you might want to add an extra step for testing purposes. Forest Admin allows you to create remote (a.k.a staging) environments.

To create a new remote environment, go to your Project settings (1):

Then from the Environments tab, click on "Add a new environment" (2).

You can choose to deploy to a remote (staging) environment before going to production (see below), it's up to you.

Choose your environment name

You'll first be asked to input the name of the remote environment you wish to create:

Enter your agent's URL for that environment

Deploy your agent to your new server - your staging server for instance - then input its URL:

Connect to your database

You need a separate database for this new environment: if you're creating a Staging, then it must be your staging data, so your staging database!

Your database credentials never leave your browser and are solely used to generate environment variables on the next step, so they are never exposed.

Set your environment variables

The final step requires that you add environment variables to your server. Follow the on-screen instructions:

Once your node server is successfully detected and running with the indicated environment variables, a Finish button will appear. Click on it to finalize the creation of your new remote environment.

Change environment origin

You can change the origins of your environments to create complex workflows, for instance, dev > staging > preprod > production. All the layouts of an environment will be generated based on its parent's layout.

To do so, click on the environment you wish to change the origin of, and from its details page, select the desired origin in the Set Origin section.

All child environments will be refreshed based on the new architectures.

Set an environment as production

A standard project usually has a production and at least a staging environment, but you may be using other remote environments. At some point, you may feel the need to set another environment as your production environment (a.k.a reference).

To set as production an environment it should have the actual reference as origin.

To do so, click on the environment you wish to set as production, and from its details page, click "Set as production".

The actual reference will take the new production as the origin. All children layouts will be refreshed. Any layout change that is not applicable will be ignored.

Delete an environment

You may also delete an environment. Be very careful as there is no going back!

Last updated

Revision created on 5/31/2023