Skip to content
Home » My Blog Tutorial » How to Set Up Odoo 14 with Docker and PostgreSQL 15

How to Set Up Odoo 14 with Docker and PostgreSQL 15

odoo 14 docker

Odoo 14 PostgreSQL 15 configuration – In this guide, we will walk you through the process of setting up Odoo using Docker and PostgreSQL. You will learn how to configure the necessary files and run your Odoo instance smoothly.

Why Use Docker and PostgreSQL for Odoo?

Odoo 14 PostgreSQL 15 configuration – Using Docker and PostgreSQL for Odoo simplifies the deployment process, enhances scalability, and ensures a consistent environment. Docker containers isolate your application, while PostgreSQL offers robust database management.

Prerequisites for Setting Up Odoo with Docker

Before we begin, ensure you have the following prerequisites:

  • Docker installed on your system. Install Docker.
  • Basic knowledge of Docker and command-line interface.

Step-by-Step Guide to Configure Odoo and PostgreSQL

Step 1: Create a Project Directory

First, create a project directory to hold all your configuration files:

mkdir odoo-docker-setup
cd odoo-docker-setup
mkdir addons config
Step 2: Set Up the Odoo Configuration File

Create an odoo.conf file inside the config directory with the following content:

[options]
addons_path = /mnt/addons-extra, /usr/lib/python3/dist-packages/odoo/addons
admin_passwd = admin_passwd
csv_internal_sep = ,
data_dir = /var/lib/odoo
db_filter =
db_maxconn = 64
db_host = mydb
db_name = odoo
db_user = odoo
db_password = myodoo
db_port = 5432
db_sslmode = prefer
db_template = template0
debug_mode = False
demo = {}
email_from = False
geoip_database = /usr/share/GeoIP/GeoLite2-City.mmdb
http_enable = True
http_interface =
http_port = 8069
limit_memory_hard = 2684354560
limit_memory_soft = 2147483648
limit_request = 8192
limit_time_cpu = 60
limit_time_real = 120
list_db = True
log_db = False
log_handler = [':INFO']
log_level = info
logfile = None
longpolling_port = 8072
max_cron_threads = 2
osv_memory_age_limit = 1.0
osv_memory_count_limit = False
smtp_password = False
smtp_port = 25
smtp_server = localhost
smtp_ssl = False
smtp_user = False
workers = 0
xmlrpc = True
xmlrpc_port = 8069
xmlrpcs = True
xmlrpcs_port = 8071
dbfilter = .*
Step 3: Configure the Docker Compose File

Create a docker-compose.yml file in the project root directory with the following content:

services:
  web:
    image: odoo:14
    container_name: o14-4
    depends_on:
      - mydb
    ports:
      - "8014:8069"
    volumes:
      - ./addons:/mnt/addons-extra
      - ./config:/etc/odoo
      - o14-data4:/var/lib/odoo
    command: odoo -i base
  mydb:
    image: postgres:15
    container_name: p15-4
    environment:
      - POSTGRES_USER=odoo
      - POSTGRES_PASSWORD=myodoo
      - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
      - p15-data4:/var/lib/postgresql/data/pgdata
volumes:
  o14-data4:
  p15-data4:
Step 4: Start Your Docker Containers

Navigate to your project directory and run the following command to start your Docker containers:

docker-compose up -d

This command will download the necessary images and start your Odoo and PostgreSQL containers.

Verifying Your Odoo Setup

After starting your Docker containers, verify your setup by accessing Odoo in your web browser. Open your browser and go to http://localhost:8014. You should see the Odoo login screen.

Troubleshooting Common Issues

If you encounter issues, consider checking the following:

  • Ensure Docker is running correctly.
  • Check the container logs for errors: docker-compose logs.
  • Verify that ports are not blocked by your firewall.

Conclusion

By following this guide, you have successfully set up Odoo with Docker and PostgreSQL. This setup ensures a scalable and consistent environment for your Odoo applications.

FAQs

What is Odoo?

Odoo is an open-source ERP software that includes various business applications.

Why use Docker for Odoo?

Docker simplifies deployment, enhances scalability, and provides a consistent environment for applications.

How can I access Odoo after setup?

Open your web browser and navigate to http://localhost:8014 to access Odoo.

What if I encounter issues during setup?

Check Docker status, container logs, and ensure your firewall is not blocking the necessary ports.

Can I customize the Odoo configuration?

Yes, you can customize the odoo.conf file and adjust settings according to your needs.


Discover more from teguhteja.id

Subscribe to get the latest posts sent to your email.

2 thoughts on “How to Set Up Odoo 14 with Docker and PostgreSQL 15”

  1. Pingback: Odoo debugging Docker VSCode - teguhteja.id

  2. Pingback: Odoo Docker backup error solution - 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