Skip to content
Snippets Groups Projects
Commit 2e9793d4bf8a authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:pencil: bind the odoo docker volumes to avoid duplication of unnamed modules

parent 301be6c56f6c
No related branches found
Tags 20.3.1
No related merge requests found
...@@ -276,8 +276,9 @@ ...@@ -276,8 +276,9 @@
arg.append(local_ip) arg.append(local_ip)
# auto detect local conf # auto detect local conf
local_conf_path = 'conf/dev/odoo.conf' local_conf_dir = os.path.join('conf', 'dev')
local_conf_path = os.path.join(local_conf_dir, 'odoo.conf')
user = db_user user = db_user
password = db_password password = db_password
if os.path.isfile(local_conf_path): if os.path.isfile(local_conf_path):
logging.info('Local configuration file found: %s' % local_conf_path) logging.info('Local configuration file found: %s' % local_conf_path)
...@@ -280,9 +281,9 @@ ...@@ -280,9 +281,9 @@
user = db_user user = db_user
password = db_password password = db_password
if os.path.isfile(local_conf_path): if os.path.isfile(local_conf_path):
logging.info('Local configuration file found: %s' % local_conf_path) logging.info('Local configuration file found: %s' % local_conf_path)
binds.append('%s:/opt/odoo/etc/odoo.conf' % os.path.join( binds.append('%s:/opt/odoo/etc' % os.path.join(
project_path, local_conf_path)) project_path, local_conf_dir))
cp_local = ConfigParser.ConfigParser() cp_local = ConfigParser.ConfigParser()
cp_local.read(local_conf_path) cp_local.read(local_conf_path)
if not user: if not user:
...@@ -304,6 +305,11 @@ ...@@ -304,6 +305,11 @@
else: else:
logging.debug('No data volume for this odoo version') logging.debug('No data volume for this odoo version')
# avoid the duplication of unbind volumes with all addons
addons_volume_name = '{}_addons'.format(project_name)
addons_volume = getVolume(docker_client, addons_volume_name)
binds.append('{}:/opt/odoo/additional_addons'.format(addons_volume_name))
if start_postgresql: if start_postgresql:
pg_repository = 'xcgd/postgresql' pg_repository = 'xcgd/postgresql'
pg_image = '{}:{}'.format(pg_repository, postgresql_version) pg_image = '{}:{}'.format(pg_repository, postgresql_version)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment