diff --git a/README.md b/README.md index 205733ab..887dabc5 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,9 @@ subsequently run. Files here will be environment-variable-expanded and concatenated in `/opt/odoo/auto/odoo.conf` in the entrypoint. +You can use a different custom directory to concatenate the configuration by using the +`CUSTOM_CONF_DIR` environment variable in the odoo service of the compose specific file. + #### `/opt/odoo/custom/ssh` It must follow the same structure as a standard `~/.ssh` directory, including `config` diff --git a/bin/config-generate b/bin/config-generate index 7865890d..921679af 100755 --- a/bin/config-generate +++ b/bin/config-generate @@ -26,7 +26,8 @@ except ImportError: ODOO_VERSION = os.environ.get("ODOO_VERSION") TARGET_FILE = os.environ.get("ODOO_RC", "/opt/odoo/auto/odoo.conf") -CONFIG_DIRS = ("/opt/odoo/common/conf.d", "/opt/odoo/custom/conf.d") +CUSTOM_CONF_DIR = os.environ.get("CUSTOM_CONF_DIR", "/opt/odoo/custom/conf.d") +CONFIG_DIRS = ("/opt/odoo/common/conf.d", CUSTOM_CONF_DIR) CONFIG_FILES = [] # Read all configuraiton files found in those folders