Getting Started

Customizing Your App Environment

»Deploy Templates and App Environment

The environment in which your app is built and then runs is defined by the deploy template you chose when you created your app and the settings for that template.

Each deploy template is designed for a specific type of app and allows you to configure the settings that make the most sense for that type of app. Many deploy templates also support settings that are common to most apps, like runtime environment variables and build environment variables.

To access your app's settings, go to your Dashboard, choose an app, then click on the Settings tab. Then click the Configuration tab below that. (Advanced users may wish to use the YAML settings editor.)

In the example settings below for a Node.js deploy template, you can see a section with several Node.js-specific settings in addition to sections for environment variables. Click on the section names to show or hide the settings for that section.

Settings for a Node.js app

After making changes to your app settings, click Save Settings. The updated settings are not available to your app until it is redeployed. To manually re-deploy your app, see manually re-deploying your app. If you want to save settings and immediately redeploy, click Save Settings and Update Deployment.

tip

Sensitive values such as passwords and secrets may be stored in your app settings. App settings are securely stored using AES encryption.

»Environment Variables

Adaptable provides 2 types of Environment variables, and two sections where you can set them, Runtime Environment and Build Environment.

Runtime Environment variables are available to your code after your app has started.

It is the place to put things like API keys, usernames, passwords, and anything else your app needs to run properly after it has been deployed. If you are unsure of where to put your environment variable, Runtime Environment is probably the right place.

When Adaptable deploys your app, it first builds your source code repo into a container image that will be run in the Adaptable Container Service. Build Environment variables are available to your code only during this build step, which includes module installation and any build script you have configured. Unlike Runtime Environment variables, they are not available to your app once it starts running.

In the Build Environment, you can place configuration needed for your build, such as compiler settings and lint settings. Some applications will need to connect to runtime services during build, like accessing APIs or Databases for generating static page content during build.
In these cases, you should set the relevant variables in the Build Environment as well as the Runtime Environment.

»Runtime Environment Variables

To set runtime environment variables, go to your Dashboard, choose an app, then click on the Settings tab. Next, click the Configuration tab below that, then click on Runtime Environment to expand that section. (Advanced users may wish to use the YAML settings editor.)

In the example settings below, two environment variables will be set during runtime. The environment variable APP_COLOR will be set to the value blue and APP_ID will be set to 1234.

Setting run time environment variables

Clicking the blue plus button adds another environment variable. Clicking the gray X button next to an environment variable deletes that variable.

After making changes to your app settings, click Save Settings. The updated settings are not available to your app until it is redeployed. To manually re-deploy your app, see manually re-deploying your app. If you want to save settings and immediately redeploy, click Save Settings and Update Deployment.

tip

Sensitive values such as passwords and secrets may be stored in your app settings. App settings are securely stored using AES encryption.

note

Runtime environment variables are not available during your app's build process. Depending on your app's requirements, you may wish to set some of the same variables in both the runtime environment and the build environment.

»Build Environment Variables

To set build environment variables, go to your Dashboard, choose an app, then click on the Settings tab. Next, click the Configuration tab below that, then click on Build Environment to expand that section. (Advanced users may wish to use the YAML settings editor.)

In the example settings below, two environment variables will be set during the image build process. The environment variable NODE_ENV will be set to the value development and BUILD_ID will be set to 1234.

Setting build environment variables

Clicking the blue plus button adds another environment variable. Clicking the gray X button next to an environment variable deletes that variable.

After making changes to your app settings, click Save Settings. The updated settings are not available to your app until it is redeployed. To manually re-deploy your app, see manually re-deploying your app. If you want to save settings and immediately redeploy, click Save Settings and Update Deployment.

tip

Sensitive values such as passwords and secrets may be stored in your app settings. App settings are securely stored using AES encryption.

note

Build environment variables are not available during normal app runtime, in the Adaptable Container Service. Depending on your app's requirements, you may wish to set some of the same variables in both the runtime environment and the build environment.

»YAML Settings Editor

The YAML settings editor can be used to view and edit all settings supported by the deploy template you selected for your app.

warning

Using the YAML settings editor is typically for more advanced users who are familiar with the details of deploy templates and their associated schema.

Most commonly used settings can be accessed via the Configuration tab instead of the YAML tab. See previous sections on this page for more information.

Incorrect use of the YAML settings editor may result in unexpected behavior while building, deploying, or running your app.

To view or edit your app's deploy template settings, go to your Dashboard, choose an app, then click on the Settings tab. Then click the YAML tab below that.

Your app's current settings are shown in YAML format and can be edited directly in the editor.

In the example settings below for a Node.js deploy template, several values are set, including two build environment variables and two runtime environment variables.

Using the YAML settings editor

For more details on the settings available, see the documentation for your chosen deploy template.

After making changes to your app settings, click Save Settings. The updated settings are not available to your app until it is redeployed. To manually re-deploy your app, see manually re-deploying your app. If you want to save settings and immediately redeploy, click Save Settings and Update Deployment.

tip

Sensitive values such as passwords and secrets may be stored in your app settings. App settings are securely stored using AES encryption.