Install odoo 13 using Docker like a Pro.

Install odoo 13 using Docker like a Pro.

Spread the love

Odoo is a powerful open-source business applications suite. It provides comprehensive functional coverage for business needs. Odoo contains CRM, ERP, sales, project management,  HR Management Suites, Accounting, and Business Instant Messaging. This article explains how to install ODOO 13 and postgres database using docker. In easy two steps approach, In additional to advanced installation.

What we will do

Hence, In this article we are going through the following

  • Setup docker environment.
  • Install ODOO 13 in easy two steps.
  • Install ODOO 13 docker like a Pro, by customization and advanced configuration.

Docker Containers

Containers allow you to improve your server security. In other word , It will isolate applications from the host system and from each others. In addition, you have easier management since install, upgrade, and rollback processes are very simple and fast.

First, we If you are using Ubuntu there are few packages you should install to run the docker.

After that, we will install latest stable version of docker from docker team (not the one provided by ubuntu).
This will be through few steps. These steps conclude Install GPG key for security. then ,  Install a stable version of the Docker .

Finally, Add your user to the docker group.

Simple ODOO 13 installation

To install odoo, firstly, we’ll lunch a postgreSQL database instance, just execute the following command. Make sure that, you don’t change database name

Then, lunch odoo contains.

By executing the last command, you installed odoo. accordingly, You can access your application through URL http://<Server IP >: 8069

Advanced ODOO 13 installation

Now, we further customize ODOO installation, by expanding it’s capabilities, for example, We will automate ODOO container creation; auto restart; secure odoo database, and add persistence storage to keep all your data safe. If you don’t have it you can Install docker compose

Setup odoo pre-requirements

To begin with, we will create a folder odoo-crm. Then, navigate inside that folder. Then create a file with name dockerfile.

Add the following YAML, which achieve what we want.afterward, we will comp

Secure database communication.

When you execute docker compose command, It will  automatically create a separate network , thus,  isolating all containers mentioned in the YAML file.

ODOO auto restart

When adding option “restart: unless-stopped” . It will put the containers

Persistence storage

When Docker-compose starts , it will automatically creates the folder structure for persistence storage. Container will read the data and configurations from paths described in the dockerfile. However, we will create them manually, in order to customize odoo configuration.

Application folder structure 

The following is the structure of odoo application directories. As you can see it allows you to easily manage addons and change the configuration odoo.

odoo-app/
├── addons
├── config
│   └── odoo.conf
├── enterprise
└── web-data

odoo-app/web-data          maps to container internal path /var/lib/odoo
odoo-app/config                maps to container internal path /etc/odoo
odoo-app/addons              maps to container internal path /home/odoo/addons
odoo-app/enterprise         maps to container internal path /home/odoo/enterprise

Database data

Docker-compose will create the folder for postgreSQL data files. Therefore, you don’t need to create that folder.

odoo-db        maps to container internal path /var/lib/postgresql/data

Configure ODOO Settings

We will customize odoo setting by changing odoo.conf.  This file contains lot of configuration, however , we will focus on few settings. for example, database server and Master password.

if you want advanced settings read that article.

Create odoo.conf file inside our config directory, then, add configuration the following lines

Lunch ODOO instances

while you are inside odoo-crm directory, execute the following command to start docker-compose.

docker-compose up -d

On successful execution, you can access it through URL http://<Server IP >: 8069

Finally, setup ODOO.

When you navigate to your website you will see the following page.

odoo-setup-intro

Just enter  your admin password, and chose a name for odoo database, then enter your details. when you click create database button, odoo control panel will open showing all it’s features.

odoo-ControlPanel

Conclusion

Installing ODOO have been never easier, when you use containers. In few steps you’ll have your application ready.