From 8a9ffe423d3e51ae874881b2fa5ef17f64292bb6 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Sat, 5 Dec 2020 20:46:30 -0500 Subject: [PATCH] [ADD] docker: support when volume is mounted on /etc/odoo - config odoo.conf is overwrite, so made a copy before solve the problem --- docker/Dockerfile.prod.pkg | 2 ++ docker/entrypoint.sh | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/docker/Dockerfile.prod.pkg b/docker/Dockerfile.prod.pkg index 58f9e73..a6be82b 100644 --- a/docker/Dockerfile.prod.pkg +++ b/docker/Dockerfile.prod.pkg @@ -43,6 +43,8 @@ RUN cd $ODOO_PREFIX && \ ./docker/repo_manifest_gen_org_prefix_path.py $ODOO_PREFIX/addons /etc/odoo/odoo.conf /etc/odoo/odoo.conf && \ head /etc/odoo/odoo.conf +RUN cp /etc/odoo/odoo.conf /odoo.conf + #RUN mkdir '/home/odoo/.local' #RUN chown -R odoo '/home/odoo/.local' diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 3ed326c..40c9f97 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -42,6 +42,11 @@ then exit 1 fi +# Fix volumes of odoo.conf if not exist +if [ ! -f "/etc/odoo/odoo.conf" ]; then + cp /odoo.conf /etc/odoo/odoo.conf +fi + # set the postgres database host, port, user and password according to the environment # and pass them as arguments to the odoo process if not present in the config file : ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}}