Community mailing list archives
Re: Howto upgrade database in Dockerby
Apertoso, Jos De Graeve
2016-10-24 14:43 GMT+02:00 Mario Gielissen <firstname.lastname@example.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?
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.