Default Environment Variables

Describes how to create and manage default environment variables for all of your Release Environments.
Example of default environment variables

Environment variables, like the environment configs come in two forms: defaults and environment specific variables.

The default environment variables that are generated by Release are located under your Application (left hand side-bar) in the Settings menu.

In order to view and edit your default configuration click 'Edit' to the right of 'Environment Variables'.

Edit the default environment variables

Environment variables consist of application specific ones found during application creation, Release auto-generated variables and user created variables.

mapping:
type: Hash
description: Maps Release variables to your app's variables
required: false
defaults:
type: Array
description: Default environment variables for your app
required: true
services:
type: Hash
description: Service specific environment variables
required: false

Default Environment Variables Schema

Environment variables consist of key, value, and (optional) secret flag. Environment variables can be secret by marking secret=true. Secrets are encrypted at rest in a vault and hidden in the UI.

key:
type: String
description: Env variable name
required: true
value:
type: String
description: Value for variable
required: true
secret:
type: Boolean
description: Value is secret and should be encrypted and not visible in the UI when viewing
required: false

Individual Environment Variable Schema

Mapping

Defining a mapping of your application's environment variables to Release's environment variables is a way to give your application access to the variables created by Release. This is useful when using Instant Datasets or if your application needs a backend URL for your frontend service, for example. Since Release is creating random hostnames it is often useful to map these variables so your application doesn't need to change.

mapping:
DATABASE_HOST: RELEASE_PROD_RDS_DB_POOL_HOST
DATABASE_PASSWORD: RELEASE_PROD_RDS_DB_POOL_PASS
DATABASE_USER: RELEASE_PROD_RDS_DB_POOL_USER
DD_ENV: RELEASE_ENV_ID
REACT_APP_BACKEND_BASE_URL: BACKEND_INGRESS_URL
REACT_APP_FRONTEND_BASE_URL: FRONTEND_INGRESS_URL

Example of environment variable mappings

A mapping consists of a hash with at least one of your application's environment variable mapped to a Release environment variables. Your variable is on the left (the key) and the corresponding Release variable is on the right (the value).

Defaults

Defaults contain all the default environment variables. Every service will have these environment variables available to all containers.

Services

The services section is for defining environment variables available only to specific services. Under services, you create hashes keyed by the services name with an array of environment variables.

services:
backend:
- key: APPLICATION_ID
value: ab23876df-f9b4-4f18-87ea-098769624321
secret: true
queue:
- key: APPLICATION_ID
value: 979761cb-90b4-4ab8-867e-68f49832180d
secret: true

Example of service specific environment variables