diff --git a/imageroot/actions/configure-module/10configure_environment_vars b/imageroot/actions/configure-module/10configure_environment_vars index 30b4157..fddab34 100755 --- a/imageroot/actions/configure-module/10configure_environment_vars +++ b/imageroot/actions/configure-module/10configure_environment_vars @@ -20,6 +20,5 @@ ERP_NEXT_MODULES = data.get("erpSelectedModules", []) agent.write_envfile("erpnext-modules.env", { "ERP_NEXT_MODULES": ERP_NEXT_MODULES }) -agent.set_env("ERP_NEXT_MODULES", ERP_NEXT_MODULES) agent.dump_env() diff --git a/imageroot/actions/get-configuration/20read b/imageroot/actions/get-configuration/20read index 93c0f5b..b17f1bc 100755 --- a/imageroot/actions/get-configuration/20read +++ b/imageroot/actions/get-configuration/20read @@ -22,10 +22,13 @@ config = {} config["host"] = os.getenv("TRAEFIK_HOST","") config["http2https"] = os.getenv("TRAEFIK_HTTP2HTTPS") == "True" config["lets_encrypt"] = os.getenv("TRAEFIK_LETS_ENCRYPT") == "True" -config["erpSelectedModules"] = os.getenv("ERP_NEXT_MODULES", []) # Load erpnext-modules.env file +if os.path.exists("erpnext-modules.env"): + data = agent.read_envfile("erpnext-modules.env") + config["erpSelectedModules"] = data.get("ERP_NEXT_MODULES", []) +else: + config["erpSelectedModules"] = [] -erp_next_modules = "erpnext-modules.env" # Dump the configuration to stdout