cetmix / docker-odoo-debug

GNU Lesser General Public License v2.1
7 stars 14 forks source link

Can't make a symlink to the custom addons inside extra-addons directory ($HOME/odoo/extra-addons/<symlink-here>) #2

Closed mikolodz closed 1 month ago

mikolodz commented 1 year ago

Hello,

Thank you for providing this repository! In my work, for couple of years I'm storing my Odoo addons inside the folder which is synced by Git. So when I pull the fresh repo from github, my containers are automatically updated to the up-to-date addon version.

To achieve that, I make a symlink from a git-synced addon directory to the odoo default addons path. I'm also using docker-compose, where I mount this linked directory like this:

volumes:
      - ./odoo-web-data:/var/lib/odoo/.local/share/Odoo
      - ./config:/etc/odoo
      - ./addons:/mnt/extra-addons

In this case, I'm unable to do this, because the folder is mounted in a different manner and I believe that Odoo tries to search for the symlink path inside the container instead of mounting the linked directory to the local path.

When I start the container, I'm obviously getting this error: FileNotFoundError: [Errno 2] No such file or directory: '/home/administrator/git/odoo14-enterprise/addons' - - -

So, how do you manage to sync the addons, which you are working on using your odoo-docker method? Apart from that issue, the proposed method seems very organized and useful. I would definitely use it, if I could only solve the addon mounting problem.

Maybe you have some idea how to work it out?

Thank you so much, Best regards

ivs-cetmix commented 10 months ago

Hi @mikolodz thank you for your reporting! Looks like symlinks are not supported by the docker-compose parameters. But this must be checked more precisely