Articles in this section

How to configure variables

Variables give you control over your project’s build process and runtime environment. You can set them in your code to make changes across your project or independent of the code for environment-specific settings.

 

You can save variables within your project at different levels. Variables can be added as strings or base64-encoded JSON-serialized values within the system, at project or environment level.

The following table defines what types of variables are available to you:

 

Type Definer Scope Precedence Build Runtime Uses
Application Application Application 4 Yes Yes Non-secret values that are the same across all environments
Project User Project 3 Yes Yes Secret values that are the same across all environments, such as database credentials
Environment User Environment 2 Some Yes Values that vary by environment, such as which database to connect to or which payment API keys to use
Upsun Pre-defined Environment 1 Some Yes For information about your Upsun project

 

If there are conflicts between variables with the same name, variables take precedence from 1 down. 
So Upsun-provided values (1) override environment variables (2), which override project variables (3), which override application-provided variables (4).

All of the variables can also be overridden by a script.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.