Skip to content
Home » My Blog Tutorial » Setting Up Odoo 14 Docker with PostgreSQL Without Volume

Setting Up Odoo 14 Docker with PostgreSQL Without Volume

odoo 14 docker

If you want to run Odoo 14 using Docker and PostgreSQL without a volume, follow this straightforward guide. This method simplifies setup and keeps your environment clean and manageable.

Introduction to Odoo 14 and Docker

Odoo 14 is a powerful business application suite that can be easily deployed using Docker. Docker provides a portable and consistent environment, making it ideal for running applications like Odoo. Using Docker with PostgreSQL ensures a robust and scalable database solution.

Creating the Docker Compose File

To get started, you need a docker-compose.yml file. This file defines the services and their configurations.

Docker Compose File

Here is the Docker Compose file you will use:

services:
  web:
    image: odoo:14
    depends_on:
      - mydb
    ports:
      - "8069:8069"
    environment:
      - HOST=mydb
      - USER=odoo
      - PASSWORD=myodoo
  mydb:
    image: postgres:15
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_USER=odoo
      - POSTGRES_PASSWORD=myodoo

Explanation of the Docker Compose File

  • Services Definition: The file defines two services, web and mydb.
  • Odoo Service: The web service uses the Odoo 14 image and depends on the mydb service. It maps port 8069 to your local machine.
  • Environment Variables: It sets environment variables for connecting to the PostgreSQL database.
  • PostgreSQL Service: The mydb service uses the PostgreSQL 15 image. It sets up the necessary environment variables for the database configuration.

Running the Docker Containers

To run the services defined in your docker-compose.yml file, navigate to the directory containing the file and run the following command:

docker-compose up -d

This command will start the Odoo and PostgreSQL containers in detached mode.

Accessing Odoo

After the containers are running, you can access Odoo by opening your web browser and navigating to http://localhost:8069. You should see the Odoo setup page, where you can configure your database and start using Odoo.

Customizing Your Setup

You might want to customize the configuration further. For example, you can add more environment variables to fine-tune the PostgreSQL database or modify the Odoo settings.

Additional Environment Variables for PostgreSQL

You can add more environment variables to the mydb service to configure PostgreSQL further. For example:

mydb:
  image: postgres:15
  environment:
    - POSTGRES_DB=postgres
    - POSTGRES_USER=odoo
    - POSTGRES_PASSWORD=myodoo
    - POSTGRES_INITDB_ARGS="--data-checksums"

This example adds a data checksum initialization argument to PostgreSQL.

Conclusion

Setting up Odoo 14 with Docker and PostgreSQL without a volume is straightforward. By following this guide, you can quickly deploy a clean and efficient Odoo environment. Docker’s consistency and portability make managing your Odoo instances easier and more reliable.

For more details on Docker and Odoo, you can refer to their official documentation.


FAQs

1. What is Odoo?

Odoo is an open-source business application suite that covers various business needs, such as CRM, eCommerce, accounting, and inventory.

2. Why use Docker with Odoo?

Docker provides a consistent and isolated environment, making it easier to deploy and manage Odoo instances.

3. How do I access my Odoo instance?

Once the Docker containers are running, you can access Odoo by navigating to http://localhost:8069 in your web browser.

4. Can I customize the Docker setup?

Yes, you can customize the Docker Compose file to add more environment variables and tweak the configuration to meet your needs.

5. Where can I find more information?

For more details, refer to the official Odoo documentation.


Discover more from teguhteja.id

Subscribe to get the latest posts sent to your email.

1 thought on “Setting Up Odoo 14 Docker with PostgreSQL Without Volume”

  1. Pingback: Tutorial Create a Custom Docker Image for Odoo Development - teguhteja.id

Leave a Reply

Optimized by Optimole
WP Twitter Auto Publish Powered By : XYZScripts.com

Discover more from teguhteja.id

Subscribe now to keep reading and get access to the full archive.

Continue reading