Skip to content

Drownie/odoo-codebase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Odoo Docker Development Setup

This repository provides a Docker-based Odoo development environment with a simple dock helper script for common tasks.


📦 Initial Setup

1️⃣ Clone Odoo source code

Clone the official Odoo repository into odoo_github/:

git clone -b 17.0 --single-branch --depth 1 https://github.com/odoo/odoo.git odoo_github

2️⃣ (Optional) Add extra or Enterprise addons

You may add:

  • Custom addons
  • Enterprise addons
  • Third-party modules

Place them inside odoo_github/ or mount them as additional volumes.

Example:

odoo_github/
├── addons
├── odoo
├── enterprise
└── custom_addons

3️⃣ Update addons_path

Append all required addon directories to addons_path in your Odoo config:

addons_path =
    /opt/odoo/addons,
    /opt/odoo/enterprise,
    /opt/odoo/custom_addons

📍 Default config location:

/etc/odoo/odoo.conf

4️⃣ Build Docker images

docker compose build

5️⃣ Start the containers

docker compose up -d

Verify services are running:

docker compose ps

6️⃣ Initialize the database (first run only)

Create and initialize the database:

./dock --stop-after-init -i web -d odoo

✔ Creates database ✔ Installs base modules ✔ Stops Odoo after init


🧰 dock Helper Script

The dock script is a wrapper around odoo-bin inside Docker to simplify common development tasks.


✨ Features


🔄 Upgrade a module

Upgrade a specific module in a database:

./dock --stop-after-init -u <module_name> -d <db_name>

Example:

./dock --stop-after-init -u sale -d odoo

🐚 Open an Odoo shell

Open an interactive Odoo shell:

./dock shell -d <db_name>

Example:

./dock shell -d odoo

▶️ Run Odoo normally (no auto-stop)

./dock -d <db_name>

📌 Notes & Best Practices

  • The default config file used is:

    /etc/odoo/odoo.conf
    
  • You can override it with:

    ./dock -c /path/to/odoo.conf
  • Database credentials are injected automatically unless overridden.


🧪 Common Troubleshooting

  • Config changes not applied?

    docker compose restart odoo
  • Rebuild after dependency change?

    docker compose build --no-cache

✅ Requirements

  • Docker
  • Docker Compose (v2)
  • Git

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published