wttech / aemc

AEM Compose (Core & CLI)
https://wttech.blog/blog/2023/get-your-aem-together-with-aem-compose/
Apache License 2.0
45 stars 6 forks source link

Parametrize AEM dirs #98

Open krystian-panek-vmltech opened 1 year ago

krystian-panek-vmltech commented 1 year ago

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

piotr-orwat-wttech commented 1 year ago

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

krystian-panek-vmltech commented 1 year ago

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

krystian-panek-vmltech commented 1 year ago

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 commented 1 year ago

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