Skip to main content

Environment variables overview

hubble Studio environment variables allow you to configure your project’s build and functionality based on different parameters and deploy contexts.

This page explains the available options for environment variables at hubble Studio, their overriding rules, constraints, and provides guidance on how to begin using them.

Environment variables at hubble Studio

hubble Studio offers a few different options for how you can configure and use environment variables:

  • Environment variables have a key name, scope, and one or more contextual values. An environment variable’s contextual value is the value set for a specific deploy context. By default, environment variables have the same value for all deploy contexts.
  • hubble Studio provides a set of read-only variables for use during the build process and the running instance of your application.

For example, you can configure an environment variable that has one value for use with production and another value 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, environment variables have one value that is available to all deploy contexts. Alternatively, you can choose to set a different value for each of the following deploy contexts:

  • Production: for the project’s production environment.
  • Preview: for all environments that are not the production environment.
  • Environment: for a specific environment. You can override this value on individual environments using a Environment value, outlined below.

You also have the option to set an Environment value for use on a specific environment. The Environment value will be used for deployments on that specific environment only.

Limitations

The following limitations apply for environment variables:

  • Accepted characters. Keys can only include uppercase alphanumeric characters and underscores.
  • Character and value limits. Keys can contain up to 255 characters, and values can contain up to 50,000 characters.
  • Reserved variable names. Hubble Studio provides certain build environment variables that are read-only and their keys are reserved by Hubble Studio. It is not possible to modify or override these variables.