use a custom configuration file located in .config/odoo.conf
use named volumes for the Odoo and postgres data dir
To start your Odoo instance, go in the directory of the docker-compose.yml file and type:
docker-composeup-d
NB
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-uall-dodoo-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: