From 34535a2b7af92453859756996e58830d0e81f931 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Tue, 25 Jan 2022 22:29:13 -0500 Subject: [PATCH] [ADD] doc production: updating module list and configuration in docker --- doc/PRODUCTION.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/doc/PRODUCTION.md b/doc/PRODUCTION.md index a50dafe..4497f9f 100644 --- a/doc/PRODUCTION.md +++ b/doc/PRODUCTION.md @@ -155,3 +155,33 @@ Check log with ```bash sudo journalctl -feu cron ``` + +# Docker +## Update + +When update a docker, you need to update the list of module. + +Run script to update configuration : +```bash +./script/docker/docker_gen_config.sh +``` + +Edit the docker-compose.yml and update the command line (change DATABASE) to : +```yaml + command: odoo --workers 2 -u erplibre_info -d DATABASE +``` + +Note, the goal is to call `env['ir.module.module'].update_list()`. + +Restart the docker : +```bash +docker-compose down +docker-compose up -d +``` + +Revert the command in docker-compose.yml. + +You can validate in log the update, you need to find `odoo.modules.loading: updating modules list`, check +```bash +docker-compose logs -f +```