This page has moved and will be redirected soon. See Migrated topics for the complete list.

Environment variables

Adobe Commerce on cloud infrastructure enables you to assign environment variables to override configuration options. The ece-tools package sets values in the env.php file based on values from Cloud variables, variables set in the Project Web interface, and the .magento.env.yaml configuration file. The types of environment variables include:

  • ADMIN—variables override project ADMIN variables
  • Global—variables affect each stage
  • Build—variables control build actions
  • Cloud—variables specific to Adobe Commerce on cloud infrastructure
  • Deploy—variables control deploy actions
  • Post-deploy—variables control actions after deploy

Variables are hierarchical, which means that if a variable is not overridden, it is inherited from the parent environment.

For more information about customizing the build and deploy process:

You can set ADMIN variables from the Project Web interface or using the Adobe Commerce CLI. You can manage other environment variables from the .magento.env.yaml file to manage build and deploy actions across all of your environments—including Pro Staging and Production—without requiring a support ticket.

YAML files are case sensitive and do not allow tabs. Be careful to use consistent indentation throughout the .magento.env.yaml file or your configuration may not work as expected. The examples in our documentation and in the sample file use two-space indentation. Use the ece-tools validate command to check your configuration.