Environment variable rules
What the platform accepts for an application's environment variables, and how the values are stored. For the steps to set them, see Set environment variables.
Per application
An application may have at most 50 environment variables.
Names
Allowed characters
Letters, numbers and underscores
First character
A letter or an underscore, never a number
Maximum length
128 characters
Reserved
Names beginning GLBNXT_
Duplicates
Refused within one application
Names are case-sensitive, and DATABASE_HOST and database_host are two different variables. That is how the container reads them, so it is how the platform treats them. The reserved prefix is checked without regard to case, so glbnxt_url is refused as well as GLBNXT_URL.
GLBNXT_ is reserved for variables the platform supplies itself. Reserving the prefix means one of your variables can never replace one of ours.
Values
Type
Text, always
Maximum length
4000 characters
Lines
One. A value may not contain a line break
Empty
Allowed
A value is always handed to your container as text. If you set REPLICAS to 16, your application receives the string 16, not a number; this is how environment variables work everywhere, and it is worth remembering if your application reads them without converting.
An empty value is a legitimate setting and is not the same as not setting the variable at all.
How the values are stored
When a change takes effect
Adding, changing or removing a variable replaces the running container. The application restarts and keeps its address. Nothing takes effect until you choose Save and restart.
How the rules are checked
The form warns you as you type when a name or value breaks a rule. The platform then validates every variable when you save, and again during the deployment. A variable that fails validation is not applied, and the message tells you which one to fix: under its row for a single variable, or on the card for the list as a whole, such as the 50-variable limit.
Last updated
Was this helpful?