Divio environment variables¶
Divio cloud environments are automatically provided with a number of environment variables that can be used to configure the applications that run in them. These can also be overridden in the Environment variables view in the Control Panel.
DATABASE_URL,<prefix>_DATABASE_DSNEach database provisioned in Services will have a corresponding environment variable, for example
DEFAULT_DATABASE_DSN(depending on the prefix applied - the default prefix is alwaysDEFAULT). TheDEFAULT_DATABASE_DSNis also exposed asDATABASE_URL
DOMAINThe primary domain of the environment’s server.
DOMAIN_ALIASESOther domains for the environment, separated by commas.
GIT_BRANCHThe cloud environment’s Git branch.
SECRET_KEYA generated random key that your application can use as a unique identifier for internal security purposes.
STAGEThe name of the environment (
test,live, etc).
<prefix>_STORAGE_DSNEach object storage provisioned in Services will have a corresponding environment variable, for example
DEFAULT_STORAGE_DSN(depending on the prefix applied - the default prefix is alwaysDEFAULT).