Build and deploy
.magento.env.yaml file centralizes the management of build and deploy actions across all of your environments, including Pro Staging and Production, using environment variables.
Unlike other YAML configuration files, such as
.magento/services.yaml, you can use the
.magento.env.yaml file to manage configuration settings without opening a support ticket.
If you want to configure unique actions in each environment, you must modify this file in each environment branch.
.magento.env.yaml file includes the following sections:
stage—Contains the following sections:
global—Controls actions in both the build, deploy, and post-deploy phases. You can override these settings in the build, deploy, and post-deploy sections.
build—Controls actions in the build phase only. If you do not specify settings in this section, the build phase uses settings from the global section. Settings in the
build_options.inifile override settings in this section.
deploy—Controls actions in the deploy phase only. If you do not specify settings in this section, the deploy phase uses settings from the global section.
post-deploy—Controls actions after deploying your application and after the container begins accepting connections.
log—Controls notifications, including notification types and level of detail.
slack—Configure a message to send to a Slack bot.
The latest sample of the
.magento.env.yaml file is in the
magento-cloud template repository. You can find a detailed definition for each variable in the following reference topics: