aemc icon indicating copy to clipboard operation
aemc copied to clipboard

Parametrize AEM dirs

Open krystian-panek-vmltech opened this issue 2 years ago • 4 comments

imagine that aem setup is done in /opt/aem

then it is needed to launch aem cli in dir /opt as AEM CLI is looking for config file at relative path aem/home/etc/aem.yml

maybe instead

  • AEM_ROOT_DIR env var should be set to override aem relative path or...
  • AEM_HOME_DIR env var should be set to override aem/home relative path

krystian-panek-vmltech avatar Mar 07 '23 07:03 krystian-panek-vmltech

It would be nice to have also a flag ie. --config-path that provides a path to aem.yml file

piotr-orwat-wttech avatar Mar 10 '23 10:03 piotr-orwat-wttech

yep we need to add it; it should have a precedence over env var AEM_CONFIG_FILE

krystian-panek-vmltech avatar Mar 10 '23 10:03 krystian-panek-vmltech

the problem here is that some flag default value like for aem instance await --done-threshold is picked up from config and they are still overridable by CLI ...so this is sth like an egg and chicken problem - what should be initialized earlier... CLI app or the config. that's why currently AEM_CONFIG_FILE env var is the only way to change the aem.yml file location. IMO I am not sure if it's worth it to redesign the way how it is implemented now as it just works fine

krystian-panek-vmltech avatar Mar 19 '23 11:03 krystian-panek-vmltech

AEM_ROOT_DIR should be then used in SetDefault() methods in defaults.yml to propagate that value globally/correctly

krystian-panek-vmltech avatar Mar 20 '23 15:03 krystian-panek-vmltech