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
A variables dictionary that defines variables to control the environment.
Optional in single-runtime and composable images.
Upsun 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 valueMy site rocksthat’s available in thePLATFORM_VARIABLESenvironment variable
.upsun/config.yaml
applications:
myapp:
type: 'python:3.13'
source:
root: "/"
variables:
env:
AUTHOR: 'Juan'
d8config:
"system.site:name": 'My site rocks'
.upsun/config.yaml
applications:
myapp:
type: "composable:25.05"
source:
root: "/"
stack:
runtimes: [ "python@3.13" ]
variables:
env:
AUTHOR: 'Juan'
d8config:
"system.site:name": 'My site rocks'You can also define and access more complex values.