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 !
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.
You should have an ENTRYPOINT
or CMD
in your Dockerfile
that runs python odoo.py -u all
, the -u all
option is for Odoo not docker restart
Open your container console
docker exec -it odoo bash
Update your module using other port
/usr/bin/odoo -p 8070 -d mydb -u mymodule
If the database it's on another container
/usr/bin/odoo -p 8070 --db_host=172.17.0.2 --db_user=odoo --db_password=odoo -d mydb -u mymodule
If you are using docker compose, it can help you by placing this line inside your docker-compose.yml file in the odoo service
command: odoo -u all -d database_name
then run
docker compose up
or
docker-compose up
depending on the version.
If it updates correctly you can now remove the line inside the file and run again with
docker compose up -d
© 2022 - 2024 — McMap. All rights reserved.