Skip to content

Commit

Permalink
[IMP] support customization of the custom conf path.
Browse files Browse the repository at this point in the history
This allow you to potentially build different configuration files
based on the environment you are using.
  • Loading branch information
LoisRForgeFlow committed Jul 14, 2022
1 parent 28b16c8 commit 0c53693
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
3 changes: 2 additions & 1 deletion bin/config-generate
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0c53693

Please sign in to comment.