I am deploying Odoo 15 with Docker, and I am using the docker-compose.yml
recommended in https://hub.docker.com/_/odoo. As you can see, the following volumes are created for the web service:
volumes:
- odoo-web-data:/var/lib/odoo
- ./config:/etc/odoo
- ./addons:/mnt/extra-addons
The conclusion here is that there is a volume named odoo-web-data
for the Odoo core, and two binds, which I guess they are in order to modify easily the configuration file and the extra addons.
If I expect to add a lot of modules in the local directory addons
, in order to add those modules to the container directory extra-addons
, and therefore adding them to the Odoo running in the container, does it make sense to add them this way?
For example, I am going to add the whole Odoo Community Association l10n-spain
repository from GitHub (with all their addons), among others. Obviously I will do git pull
every now and again to update the repository.
As I am not an expert on Docker, do you think this structure is the best? What if I need to update the Odoo core in the named volume?
2
Answers
There shouldn’t be the core in volume odoo-web-data, only the filestore and sessions. The core itself is already installed in the docker image as you can see here
So updating the core usually means: Build or pull the image (for example latest) and recreate the container(s). And sometimes you also have to make an update for all modules for your existing databases, because the core (code) has changed.
The DigitalOcean’s guide explains in details how to deploy odoo with docker using nginx (on Ubuntu 20.04):
Step 1 — Installing Docker Compose
Step 2 — Running Odoo and PostgreSQL with Docker Compose
Step 3 — Installing and Configuring Nginx
Step 4 — Installing Certbot and Setting Up TLS Certificates
Step 5 — Setting Up Odoo
Back in your web browser, reload the page. You should now have Odoo’s database configuration page open via a secure https:// connection. Now you can enter usernames and passwords safely to complete the installation process (Database Name, Email, Password, Demo data…)
…
…
Full documentation here :
https://www.digitalocean.com/community/tutorials/how-to-install-odoo-on-ubuntu-20-04-with-docker