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'.
Environment variables consist of application specific ones found during application creation, Release auto-generated variables and user created variables.
mapping:type: Hashdescription: Maps Release variables to your app's variablesrequired: falsedefaults:type: Arraydescription: Default environment variables for your apprequired: trueservices:type: Hashdescription: Service specific environment variablesrequired: 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: Stringdescription: Env variable namerequired: truevalue:type: Stringdescription: Value for variablerequired: truesecret:type: Booleandescription: Value is secret and should be encrypted and not visible in the UI when viewingrequired: false
Individual Environment Variable Schema
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_HOSTDATABASE_PASSWORD: RELEASE_PROD_RDS_DB_POOL_PASSDATABASE_USER: RELEASE_PROD_RDS_DB_POOL_USERDD_ENV: RELEASE_ENV_IDREACT_APP_BACKEND_BASE_URL: BACKEND_INGRESS_URLREACT_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 contain all the default environment variables. Every service will have these environment variables available to all containers.
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_IDvalue: ab23876df-f9b4-4f18-87ea-098769624321secret: truequeue:- key: APPLICATION_IDvalue: 979761cb-90b4-4ab8-867e-68f49832180dsecret: true
Example of service specific environment variables