Run Modes precedence in Cloud AEM | Community
Skip to main content
Level 3
December 6, 2023
Question

Run Modes precedence in Cloud AEM

  • December 6, 2023
  • 2 replies
  • 1783 views

Hello, 

 

I am trying to understand the Run Modes precedence in Cloud AEM.

 

I read the Adobe doc here, which provides a list of run modes like below:

 

 

config (The default, applies to all AEM services) config.author (Applies to all AEM Author service) config.author.dev (Applies to AEM Dev Author service) config.author.rde (Applies to AEM RDE Author service) config.author.stage (Applies to AEM Staging Author service) config.author.prod (Applies to AEM Production Author service) config.publish (Applies to AEM Publish service) config.publish.dev (Applies to AEM Dev Publish service) config.publish.rde (Applies to AEM RDE Publish service) config.publish.stage (Applies to AEM Staging Publish service) config.publish.prod (Applies to AEM Production Publish service) config.dev (Applies to AEM Dev services) config.rde (Applies to RDE services) config.stage (Applies to AEM Staging services) config.prod (Applies to AEM Production services)

 

 

I understand that the more specific ones(eg. "config.author.dev") takes precedence over the lower ones(eg. "config.dev").

 

But what about between "config.author" and "config.dev", which one has more specificity? As you already know, I can be on the Author mode of a Dev environment, which satisfies both, so which one takes precedence here?

 

Thank you,

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

arunpatidar
Community Advisor
Community Advisor
December 6, 2023

Hi @sean12341 
If you are targeting configs for :

Author : config.author

Publish : config.publish

Dev(Author): config.author.dev

Dev(Publish): config.publish.dev

Dev(Author & Publish): config.dev

 

You don't need to create more than one config for same runmode.

 

 

Order of Precedence:

  • Configuration settings are applied based on an order of precedence. The settings in the /apps directory take precedence over /libs settings.
  • Run mode-specific settings take precedence over common settings.
  • If there are multiple configurations under the same run mode, the order of the paths in the repository matters.
  • Configurations at deeper paths in the repository structure take precedence.
Arun Patidar
NageshRaja
Level 5
October 29, 2024

@arunpatidar- I have a system configuration defined for each run mode in cloud - config.author.rde, config.author.dev, config.author.stage and config.author.prod

There are about 25+ set of configurations defined out of which only 5 differ based on runmode.

In this case is it better to put the base configuration of 20 in config.author and only put the delta difference of 5 configurations in each runmode based on environment?

 

arunpatidar
Community Advisor
Community Advisor
October 29, 2024

Hi @nageshraja 
Yes, if the configs are common/same for all the runmodes then you can use config(Author and Publish) or config.author(Author Only) or config.publish(Author Only) folders.

 

Others can go to dedicated runmode folders or use env variables.

Arun Patidar
vikramca06
Level 4
December 6, 2023

config.author or config.publish - gives you the ability to manage common configurations for all the authors and publishers

 

similarly, you can use environment specific configs to have common configs for the env like dev, stage and prod.

 

finally, instance specific configurations can be added to config.author.{env} or config.publish.{env}

 

its not required to keep the same config in all the combinations of run modes. just place it where needed and reduce the duplication.

 

Regards,

Vikram.