Skip to Content
Menu
This question has been flagged
2 Replies
13103 Views

Dear All,

I've following instructions to have Odoo 12:

1. AWS EC2 new instance, Ubuntu 64. Setting corresponding security policy <done>
2. SSH access <done>
3. Docker installation as per (https://docs.docker.com/install/linux/docker-ce/ubuntu/). Hello world run is ok
4. Create user for odoo with sudo and docker group permission
5. Install odoo following https://docs.docker.com/samples/library/odoo/
6. Having problem with odoo-bin scaffold to create custom module. Then delete the container and recreate one using:
docker run -v /path/to/addons:/mnt/extra-addons -p 8069:8069 --name odoo --link db:db -t odoo
7. test by opening the ip-add:8069 in Chrome: its working. Creating first database, done.
8. SSH as odoo user and trying to create custom module - using either odoo-bin; /odoo-bin; odoo; ./odoo-bin --> all 'command not found'

Its been 3 very painful days trying on this, but no success up to now. 

Please help.



Avatar
Discard
Best Answer

If you are using Docker, odoo-bin (in the Dockerized version it's odoo) is inside the Odoo container. You need to execute the command inside the docker container you created for Odoo.

You can try the following:

$ docker exec -it odoo /bin/bash

This will connect you to a bash shell inside the docker container you created for Odoo.

$ odoo scaffold <module name> /mnt/extra-addons/
$ exit

Now go into the directory you mapped to /mnt/extra-addons (/path/to/addons in your example above) and you should find the module scaffold in there.

Avatar
Discard

@ Paresh Wagh
Hi am facing the same issue here. I cant locate odoo neither the addons folder.
i have used these two commands.
-------------------------------------------------------------------
docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name mydb postgres

docker run -v odoo\addon:/mnt/extra-addons -p 8069:8069 --name myisntance --link mydb:db -t odoo

-------------------------------------------------------------------

am using winscp to see my files n folders.

@Rajeev - The following part of your command does not seem right. You may want to refer to the docs at the links posted above.

odoo\addon:/mnt/extra-addons

Author Best Answer

Hi Paresh,

Great thanks. I've managed to scaffold - and even able to show in the hompage with Apps Update List. But I've difficulty to find the extra-addons folder. With your tips, I manage to locate them --- very far away from my Home dir. And found that those folders owned by root.

odoo@ip-172-31-30-99:/$ sudo ls -la /var/lib/docker/volumes/odoo-extra-addons/_data
total 20
drwxr-xr-x 5 systemd-resolve root            4096 Aug 12 16:08 .
drwxr-xr-x 3 root            root            4096 Aug 12 11:37 ..
drwxr-xr-x 7 root            root            4096 Aug 12 13:15 bsd_test
drwxr-xr-x 7 systemd-resolve systemd-journal 4096 Aug 12 16:08 bsd_test_lagi
drwxr-xr-x 7 systemd-resolve systemd-journal 4096 Aug 12 11:42 test

All also not directly in mapped volume, but further down '_data'. Also notice that some modules owned by root, and others by systemd-resolve. 

Are those normal?

Thanks a lot



Avatar
Discard

That's because it's using docker's built-in volumes. You can check by typing in the following command

$ docker volume list

It will show you a list of volumes managed by docker. If you want to store your data in external folders on your host you need to map these volumes when you create the container. Here's a link from the docker documentation that provides an excellent explanation of how to manage volumes.

https://docs.docker.com/storage/

Author

Thanks alot Paresh. Its working now - by binding my host folder to docker addons dir. Got permission denied when using scaffold, mkdir. But then i use direct uid when invoking docker exec bash. Not clean, but at least working.

Not yet understand on volume mount though - in which volume mount still not accessible from host env (for editing the module components).

Related Posts Replies Views Activity
1
Jul 24
1686
1
Jan 24
4662
4
Dec 23
45619
2
Mar 23
2531
1
Jan 23
3497