variables
Try Upsun for 15 days
After that, enjoy the same game-changing Upsun features for less with the First Project Incentive!¹ A monthly $19 perk!
¹Terms and conditions apply. Only for Flexible Resource projects.
A variables dictionary that defines variables to control the environment.
Optional in single-runtime and composable images.
Upsun Fixed provides a number of ways to set variables. Variables set in your app configuration have the lowest precedence, meaning they’re overridden by any conflicting values provided elsewhere.
All variables set in your app configuration must have a prefix. Some prefixes have specific meanings.
Variables with the prefix env are available as a separate environment variable.
All other variables are available in the PLATFORM_VARIABLES environment variable.
The following example sets two variables:
- A variable named
env:AUTHORwith the valueJuanthat’s available in the environment asAUTHOR - A variable named
d8config:system.site:namewith the valueExample Sitethat’s available in thePLATFORM_VARIABLESenvironment variable
.platform.app.yaml
name: myapp
type: 'python:3.14'
source:
root: "/"
variables:
env:
AUTHOR: 'Juan'
d8config:
"system.site:name": 'Example Site'
.platform/applications.yaml
myapp:
type: "composable:26.05"
source:
root: "/"
stack:
runtimes: [ "python@3.14" ]
variables:
env:
AUTHOR: 'Juan'
d8config:
"system.site:name": 'Example Site'You can also define and access more complex values.