Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Odoo docker image: how to scaffold?

When you install the Odoo (version 10) docker image, how to reproduce this command:

odoo-bin scaffold openacademy addons
like image 339
Billal Begueradj Avatar asked Apr 21 '18 05:04

Billal Begueradj


People also ask

How to add addons to Odoo Docker container?

In Odoo docker the place for addons is in /mnt/extra-addons. You can also do scaffolding manually by executing bash in the container and doing scaffolding like in any other Odoo environment inside the container. Start bash like this:

What happens to the Odoo filestore when a container is removed?

When the Odoo container is created like described above, the odoo filestore is created inside the container. If the container is removed, the filestore is lost. The preferred way to prevent that is by using a Docker named volume.

What is the Odoo scaffold command?

The scaffold command is a built in command that is available across all Odoo versions. Usually you should execute the Odoo main file, which is usually named odoo-server.

Can I run Odoo in a Postgres container?

The alias of the container running Postgres must be db for Odoo to be able to connect to the Postgres server. When the Odoo container is created like described above, the odoo filestore is created inside the container. If the container is removed, the filestore is lost. The preferred way to prevent that is by using a Docker named volume.


1 Answers

You can do scaffolding from the Docker host with this command:

docker exec unkkuri-odoo /usr/bin/odoo scaffold openacademy /mnt/extra-addons

In this command "unkkuri-odoo" is the name of the Odoo container. You have to have the container running when you run this scaffolding command. Another important thing is the folder used for addons. In Odoo docker the place for addons is in /mnt/extra-addons.

You can also do scaffolding manually by executing bash in the container and doing scaffolding like in any other Odoo environment inside the container. Start bash like this:

docker exec -ti unkkuri-odoo bash

And scaffold in container like this:

/usr/bin/odoo scaffold openacademy1 /mnt/extra-addons
like image 156
Veikko Avatar answered Sep 21 '22 15:09

Veikko