Why Deploy Odoo as a Docker Container?

  • Odoo ERP

  • Published On October 28, 2020

Featured Image
Why Deploy Odoo as a Docker Container?

Solomon Hykes founded Docker in 2013 with an aim to make containers easy to use. With the introduction of Docker 1.0 in June 2014, the buzz has only become louder.

According to Docker, more than 3.5 million applications have been placed in containers using Docker technology, and over 37 billion containerized applications have been downloaded.

Now let’s read and try to understand what Docker is all about in detail and its relationship with Odoo.

What is Docker?

Docker is a program that allows you to build containers that wrap software installations into a full file system that includes all you need to run the software: code, runtime executables, configuration files, system libraries. All these specifications are usually installed on a server to allow the software to run smoothly.

Containers are a standardized software unit that allows developers to isolate their apps from their environment so that they work on every machine regardless of the platform. For software developers today, Docker is the de facto standard for creating and sharing containerized apps from desktop to cloud. It creates an exclusive, code-to-cloud experience for developers and their teams.

Since Odoo installations have many dependencies and configuration specifications, Docker is one way to make Odoo installations much more portable and easier to manage.

Setting up Docker with Odoo

Docker has a bunch of useful documentation and it’s pretty easy to set up. These documentations tell you how you can use Docker with Odoo to get the installation up and running. From there, you learn how to do tasks like starting and stopping the Odoo server. If you are interested in learning how to build modular Odoo installations that can be easily transferred between servers or if you want to host several Odoo installations on the same server, Docker can make this much simpler once you understand the basics.

Deploying Odoo as a Docker Container

If you want to test ODOO you can either install the full system on a Linux server, or you could use it as a container for faster setup and deployment. This is a perfect way to get the wheels of the system up and running before taking the time to deploy them in a conventional way.

In this article, we’ll take the example of deploying Odoo as a Docker container on Ubuntu 18.04.

Step 1

Get your Ubuntu server installed and running and Docker working properly. You will also need to have a user account created in order to issue commands.

Step 2

After your Ubuntu setup is complete, you need to deploy a PostgreSQL container. Log in to your Ubuntu Server instance and issue the following command:

docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres –name db postgres:10

If this order is completed, you will have a running PostgreSQL instance ready for the ODOO deployment.

Step 3

This is where we deploy the ODOO container. We can deploy on the internal and external ports 8069. Here, the port needs to be opened on your network for this to function properly. To deploy the ODOO container, issue the following command:

docker run -p 8069:8069 –name odoo –link db:db -t odoo

Step 4

This deployment uses generic configuration. You can use your own custom setup with the aid of volumes if you want to make adjustments to that. This requires writing your custom configuration manually or copying one from another deployment that you used.

The ODOO configuration file can be found in / etc / odoo / odoo.conf. To use these volumes, you need to place the file in a directory that can be read by your Docker user.  To deploy ODOO, using your custom configuration file, issue the command:

docker run -v /data/odoo.conf:/etc/odoo -p 8069:8069 –name odoo –link db:db -t odoo

Step 5

Once the command is issued, open the browser and point it to http:/SERVER IP:8069, where SERVER IP is the IP address of your docker server. You will be welcomed by the ODOO set-up screen.

Your Odoo ERP is set and ready to use.

Conclusion

Developing apps today need so much more than just writing code. Multiple languages, systems, architectures, and inter-tool interfaces for each life-cycle stage build immense complexity. Docker simplifies and accelerates the workflow while at the same time allowing developers the ability to experiment with their choice of tools, framework stacks, and deployment environments for each project. Contact Brainvire if you are looking for Odoo ERP Development Services.

    Ready for Digital Transformation?

    Ask our team for custom made business growth plan.

    Related Articles

    • Odoo vs Microsoft Dynamics Brief Comparison
      Odoo vs. Microsoft Dynamics: More Advanced Functionality to Cater for All Your Business Needs

      The right Enterprise Resource Planning (ERP) system is a crucial pipeline in companies’ attempts for growth, enhanced productivity, and automated processes in the hectic business environment. Odoo and Microsoft Dynamics

    • odoo erp
      Odoo VS SAP: Everything You Need to Know!

      Businesses today are more dynamic than ever. Every organization aims to put its best foot forward, attract the best potential customers, and boost profitability.  However, it’s easier said than done! 

    • Accelerate Your Product Delivery with Odoo PLM

       PLM is not just a technology but a management system that stores and integrates data, processes, business systems, and people of the company involved in the design, development, launch, and