Search…
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.
1
mapping:
2
type: Hash
3
description: Maps Release variables to your app's variables
4
required: false
5
defaults:
6
type: Array
7
description: Default environment variables for your app
8
required: true
9
services:
10
type: Hash
11
description: Service specific environment variables
12
required: false
Copied!
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.
1
key:
2
type: String
3
description: Env variable name
4
required: true
5
value:
6
type: String
7
description: Value for variable. If secret is true, and this field is omitted, will use previously saved value. If secret is false, this field is required
8
required: true (but hidden if secret)
9
secret:
10
type: Boolean
11
description: Value is secret and should be encrypted and not visible in the UI when viewing
12
required: false
Copied!
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.
1
mapping:
2
DATABASE_HOST: RELEASE_PROD_RDS_DB_POOL_HOST
3
DATABASE_PASSWORD: RELEASE_PROD_RDS_DB_POOL_PASS
4
DATABASE_USER: RELEASE_PROD_RDS_DB_POOL_USER
5
DD_ENV: RELEASE_ENV_ID
6
REACT_APP_BACKEND_BASE_URL: BACKEND_INGRESS_URL
7
REACT_APP_FRONTEND_BASE_URL: FRONTEND_INGRESS_URL
Copied!
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.
1
services:
2
backend:
3
- key: APPLICATION_ID
4
value: ab23876df-f9b4-4f18-87ea-098769624321
5
secret: true
6
queue:
7
- key: APPLICATION_ID
8
value: 979761cb-90b4-4ab8-867e-68f49832180d
9
secret: true
Copied!
Example of service specific environment variables
Last modified 14d ago
Copy link