Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update all odoo modules in a docker container

Tags:

I am working on a Odoo Docker container. I tried to find the appropriate command to update all the modules through the command line there but in vain. What is the appropriate command to do so ? I've put docker restart container_name -u all but also in vain. Thanks in advance !

like image 421
Abdelkader Lakhlifi Avatar asked May 30 '17 13:05

Abdelkader Lakhlifi


1 Answers

If you are using the docker-compose up command to start your servers, then you need to add the following line to your docker-compose.yml file under the odoo service:

command: odoo -u all -d odoo-prod

Where odoo-prod is the name of your database. This overwrites the default command (which is just odoo without update) and tells docker to update all modules when the container restarts.

Alternatively, you can also run a separate container that performs the updates:

docker run -v [your volumes] odoo:10.0 odoo -u all -d odoo-prod

This also overwrites the command from the dockerfile with the command stated here that includes the update.

like image 161
Robycool Avatar answered Sep 22 '22 11:09

Robycool