This repository contains a Docker-based development environment for Odoo 17 ERP from APT Repository.
- 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
- 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
βββ 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-dockergit submodule init
git submodule update --recursive --remoteImportant: 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 settingsdocker-compose up -dAccess Odoo at http://localhost:8069
The .env file contains all configurable parameters:
| Variable | Default | Description |
|---|---|---|
| ODOO_VERSION | 17 | Odoo version |
| 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 -ddocker-compose down# All services
docker-compose logs -f
# Specific service
docker-compose logs -f odoodocker-compose exec db psql -U odoo postgresPlace 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 --recursiveMaintained by ASAid Group Investment developer@asaidgroup.com