CLEAN_STATIC_FILES

  • Defaulttrue
  • Version—Adobe Commerce 2.1.4 and later

Enables or disables cleaning static content files generated during the build or deploy phase. Use the default value true in development as a best practice.

  • true—Removes all existing static content before deploying the updated static content.
  • false—The deployment only overwrites existing static content files if the generated content contains a newer version.

If you modify static content through a separate process, set the value to false.

stage:
  deploy:
    CLEAN_STATIC_FILES: false

Failure to clean static view files before deploying can cause problems if you deploy updates to existing files without removing the previous versions. Because of static file fallback rules, fallback operations can display the wrong file if the directory contains multiple versions of the same file.

CRON_CONSUMERS_RUNNER

  • Defaultcron_run = false, max_messages = 1000
  • Version—Adobe Commerce 2.2.0 and later

Use this environment variable to confirm that message queues are running after a deployment.

  • cron_run—A boolean value that enables or disables the consumers_runner cron job (default = false).

  • max_messages—A number specifying the maximum number of messages each consumer must process before terminating (default = 1000). You can set the value to 0 to prevent the consumer from terminating.

  • consumers—An array of strings specifying which consumers to run. An empty array runs all consumers.

  • multiple_processes-A number specifying the number of processes to spawn for each consumer. Supported in Commerce 2.4.4 or greater.

NOTE
To return a list of message queue consumers, run the ./bin/magento queue:consumers:list command in the remote environment.

Example array that runs specific consumers and the multiple_processes to spawn for each consumer:

stage:
  deploy:
    CRON_CONSUMERS_RUNNER:
      cron_run: true
      max_messages: 1000
      consumers:
        - example_consumer_1
        - example_consumer_2
-     multiple_processes:
        example_consumer_1: 4
        example_consumer_2: 3

Example of an empty array that runs all consumers:

stage:
  deploy:
    CRON_CONSUMERS_RUNNER:
      cron_run: true
      max_messages: 1000
      consumers: []

By default, the deployment process overwrites all settings in the env.php file. See Manage message queues in the Commerce Configuration Guide for on-premises Adobe Commerce.