This guide provides step-by-step instructions for setting up an Odoo instance with Docker, including custom and enterprise addons.
Create your project folder on your Windows PC with the following structure:
project-root/
│
├── docker-compose.yml # Docker Compose configuration file
├── odoo.conf # Custom Odoo configuration file
│
├── addons/ # Directory for custom Odoo addons
├── enterprise-addons/ # Directory for Odoo Enterprise addons
- Create a folder named
project-root
on your Windows PC. - Inside
project-root
, create the following subdirectories and files:docker-compose.yml
odoo.conf
addons/
(for custom addons)enterprise-addons/
(for enterprise addons)
- Press
Win + R
, typecmd
orpowershell
, and press Enter. - Navigate to the
project-root
directory:
cd C:\project-root
- Ensure you have Git installed and configured on your Windows machine.
- Clone the Odoo Enterprise repository into the
enterprise-addons
directory:
git clone git@github.com:odoo/enterprise.git enterprise-addons
Tip
Place your custom addons in the addons/
directory inside the project-root/
.
Create a docker-compose.yml
file inside the project-root/
directory with the following content:
version: '3.8'
services:
db:
image: postgres:15
environment:
POSTGRES_USER: odoo
POSTGRES_PASSWORD: odoo
POSTGRES_DB: postgres
volumes:
- odoo-db:/var/lib/postgresql/data
networks:
- odoo-network
odoo:
image: odoo
ports:
- "8069:8069"
volumes:
- C:/project-root/addons:/mnt/extra-addons # Custom addons
- C:/project-root/enterprise-addons:/mnt/enterprise-addons # Enterprise addons
- C:/project-root/odoo.conf:/etc/odoo/odoo.conf # Custom config file
depends_on:
- db
networks:
- odoo-network
networks:
odoo-network:
volumes:
odoo-db:
Ensure your odoo.conf
file includes the necessary configurations for addons:
[options]
; This is the Odoo configuration file
# Database connection
db_host = db
db_port = 5432
db_user = odoo
db_password = odoo
# Addons paths
addons_path = /mnt/extra-addons,/mnt/enterprise-addons,/usr/lib/python3/dist-packages/odoo/addons
# Log file
logfile = /var/log/odoo/odoo.log
# Other settings
admin_passwd = admin
Run the following command in the directory where your docker-compose.yml
file is located:
docker-compose up -d
7.1. Check Running Containers
docker-compose up -d
7.2. Access Odoo
Open a web browser and navigate to http://localhost:8069
.
7.3. Check Logs for Errors
docker logs <odoo_container_id>
Replace <odoo_container_id>
with the ID of your Odoo container, which you can find using the docker ps command.
To set up and run Odoo with Docker and custom addons on your Windows PC, you need the following software:
2. Git
4. PowerShell
Optional: Windows Terminal
If you have any questions or need further assistance, please feel free to contact me:
- Email: t.ahmed@stride.ae
- GitHub: StrideIT
Thank you for checking out this guide!