Skip to content

Environment variables overview ​

Environment variables configure the build and the running application of your project, with different values per deploy context if needed. hubble Studio also provides a set of read-only variables.

For example, a variable can have one value for production and another for preview deployments:

  • Key: API_KEY
  • Values:
    • Production: a production secret
    • Preview: a non-production secret

Configuration options and limitations ​

Value per deploy context ​

By default, a variable has one value for all deploy contexts. Alternatively, you can set a different value for each of these deploy contexts:

  • Production: for the project’s production environment.
  • Preview: for all environments that are not the production environment.
  • Environment: for a single environment.

Overriding rules ​

If a variable has values for several deploy contexts, the most specific value is used:

  1. An Environment value for the environment that is deployed overrides all other values.
  2. Otherwise, the Production value is used for the production environment, and the Preview value for all other environments.
  3. Otherwise, the value for all deploy contexts is used.

Limitations ​

  • Accepted characters. Keys can only include uppercase alphanumeric characters and underscores, and must not start with a digit.
  • Reserved variable names. Keys starting with HUBBLE_STUDIO_ are reserved for read-only variables.