Environment variables
Environment variables are used during build time for the developer portal. They may also be used in the client-side code (when explicitly allowed).
They may be set using special .env.environment_name
files, or configured one by one in the Workflows settings.
Restricted environment variables
When defining custom names, avoid commonly reserved environment variables, such as HOME
and PATH
, and those related to the Node environment such as NODE_ENV
.
Be aware of the built-in environment variables and know that changing the values may result in a behavior change during the build.
The REDOCLY_
prefix is reserved for future use by Redocly.
Add an environment variable
- Navigate to Portals , and select a portal.
- Select Settings > Environment variables .
- Select "Add Variable".
- Fill the form with the Environment variable name and value.
- If the variable is a secret, select the secret checkbox so to store it in an encrypted format and not display it in the logs.
Change an environment variable
- Navigate to Portals , and select a portal.
- Select Settings > Environment variables .
- Select the Edit icon next to the variable you want to change.
- In the Edit environment variable dialog that opens, make changes to your variable name and/or value.
- To confirm changes and exit the dialog, select Save .
Remove an environment variable
- Navigate to Portals , and select a portal.
- Select Settings > Environment variables .
- Select the Delete icon next to the variable you want to remove. The variable is removed from the list immediately.