Community mailing list archives

community@mail.odoo.com

Re: Howto upgrade database in Docker

by
Apertoso, Jos De Graeve
- 10/24/2016 11:52:07

2016-10-24 14:43 GMT+02:00 Mario Gielissen <mario@gielissen.org>:
Odoo docker image can be upgraded with 'docker run --volumes-from old-odoo -p 8070:8069 --name new-odoo --link db:db -t odoo', but howto deal with database upgrade?


Hi Mario,

Best practice is to use "throw-away" docker containers.  In other words, use a external volume for all data that you want to keep.  In the case of odoo, we create a mount point on "/srv/odoo" and start odoo with the option '--data=/srv/odoo'.  That way, all attachments are stored outside of the docker container.  

If you want to have your odoo data available to all nodes, you can use something like this: http://unix.stackexchange.com/questions/103858/inotify-and-rsync-on-large-number-of-files/150886#150886 or something like glusterfs.

In order to update odoo to a new version, just build a new docker image, and start a new container with it.

If you need to update your database, just start odoo with the "--database=yourdbname --update=your,list,of,modules,needing,an,update" option.


Regards,
Jos De Graeve - Apertoso business ICT


Guido Gezellelaan 16 - B-9800 Deinze - Belgium
 
Direct: +32 9 381 64 51
General:+32 9 381 64 50
Mobile: +32 475 54 68 80
mail/im/skype: Jos.DeGraeve@apertoso.be - apertoso