This repository contains a Docker-based development environment for Odoo 17 ERP from Package Source.
- Overview
- Features
- Prerequisites
- Directory Structure
- Installation
- Configuration
- Usage
- Development
- Troubleshooting
This workspace provides a complete development environment for Odoo 17 ERP applications using Docker and Docker Compose. The setup includes:
- Odoo application server
- PostgreSQL 16 database
- Resource-optimized configuration
- Development tools and addons support
- 🐳 Containerized development environment
- 🚀 Resource-optimized for lower-end systems
- 🔒 Environment variable configuration for security
- 📦 Easy custom addon management
- ⚙️ Pre-configured PostgreSQL with performance tuning
- Odoo package source (e.g.,
odoo_source.deb
) placed in.docker/source
- Docker 20.10.x or newer
- Docker Compose v2.x
- Git
odoo-docker/
├── .docker/ # Docker configuration files
│ ├── Dockerfile # Odoo container definition
│ ├── entrypoint.sh # Container startup script
│ ├── odoo.conf # Odoo configuration
│ ├── wait-for-psql.py # Database connection utility
│ └── source # Odoo package source
│ └── odoo_source.deb # <Place the Odoo source package here>
├── addons/ # Custom Odoo modules/addons
│ ├── oca/ # OCA community addons (submodules)
│ └── asaidgroup/ # ASAid custom addons (submodules)
├── .env # Environment variables (excluded from git)
├── .gitignore # Git ignore rules
├── .gitmodules # Git submodule definitions
├── docker-compose.yml # Docker Compose configuration
└── README.md # This file
git clone <repository-url>
cd odoo-docker
git submodule init
git submodule update --recursive --remote
Important: This step is mandatory as it fetches all the necessary Odoo addon modules defined in
.gitmodules
. The docker container will not function correctly without these submodules properly initialized.
cp .env.example .env
# Edit .env with your preferred settings
docker-compose up -d
Access Odoo at http://localhost:8069
The .env file contains all configurable parameters:
Variable | Default | Description |
---|---|---|
ODOO_DB_HOST | db | Database hostname |
ODOO_DB_USER | odoo | Database username |
ODOO_DB_PASSWORD | odoo_password | Database password |
POSTGRES_DB | postgres | PostgreSQL database name |
POSTGRES_USER | odoo | PostgreSQL username |
POSTGRES_PASSWORD | odoo_password | PostgreSQL password |
POSTGRES_SHARED_BUFFERS | 128MB | PostgreSQL memory allocation |
POSTGRES_MAX_CONNECTIONS | 20 | Max concurrent connections |
Both services are configured with resource limits:
- Odoo: 2 CPU threads, 1GB RAM
- PostgreSQL: 2 CPU threads, 512MB RAM
To modify these limits, edit the deploy.resources.limits
section in docker-compose.yml.
docker-compose up -d
docker-compose down
# All services
docker-compose logs -f
# Specific service
docker-compose logs -f odoo
docker-compose exec db psql -U odoo postgres
Place your custom modules in the addons directory. Odoo will automatically detect them.
If adding a new git submodule:
# Add a new submodule
git submodule add -b [branch-name] [repository-url] addons/[path]
# Example:
git submodule add -b 17.0 git@github.com:OCA/web.git addons/oca/web
- Access Odoo at http://localhost:8069
- Create a new database or access an existing one
- Go to Apps → Update Apps List
- Install your custom modules
Access the database manager at http://localhost:8069/web/database/manager
- Permission Denied Errors
sudo chown -R $USER:$USER .docker addons
- Port Conflicts
# Edit the port mappings in docker-compose.yml
# Example: "8080:8069" instead of "8069:8069"
- Database Connection Issues
# Check PostgreSQL logs
docker-compose logs db
- Resource Limitations
If Odoo performance is poor, try increasing the resource limits in docker-compose.yml and adjusting the corresponding settings in odoo.conf.
- Missing Addons/Modules
# Make sure submodules are properly initialized
git submodule status
# If any are missing, run:
git submodule update --init --recursive
Maintained by ASAid Group Investment developer@asaidgroup.com