This project provides a ready-to-use Odoo development environment using Docker and VS Code Dev Containers.
Ensure you have the following installed on your host machine:
-
Visual Studio Code
-
Extension: Remote – Containers (Dev Containers)
-
Docker
-
Docker Compose
git clone https://github.com/simonseleli/odoo-dockerized.git- Open the cloned folder in VS Code
- Open the Command Palette (
Ctrl + Shift + P) - Select Remote-Containers: Reopen in Container
This will:
-
Build and start the dev container using:
.devcontainer/devcontainer.jsondocker-compose.ymlDockerfile
-
Open the workspace at
/workspaceinside the container -
Provide a terminal as user
vscode(withsudoaccess)
Once inside the dev container
(terminal prompt looks like: vscode ➜ /workspace (your-branch) $):
command: odooRun Odoo in the foreground with live reload:
command: odoo -c /etc/odoo/odoo.conf --dev=reload--dev=reloadenables auto-reloading on code changes- The config file
/etc/odoo/odoo.confis mounted from./conf/odoo.conf - The config includes paths for both built-in and custom addons
For more detailed logs:
command: /usr/bin/odoo -c /etc/odoo/odoo.conf --log-level=debug --dev=reloadRun Odoo in the background and free the terminal:
command: odoo -c /etc/odoo/odoo.conf --dev=reload &Use this if you need the terminal for other tasks while Odoo runs.
-
Odoo Web Interface http://localhost:8069
-
Default Admin Password
admin(fromodoo.conf) -
Database Management Create or restore databases via the web interface
-
PostgreSQL Connection
psql -h db -U odoo -d postgresPassword: odoo
-
Foreground run: Press
Ctrl + C -
Reload mode: Press
Ctrl + Ctwice
-
Inside the container Logs appear in real time when running in the foreground
-
From the host machine
docker compose -f .devcontainer/docker-compose.yml logs -f odoo- Place your custom modules in:
./custom-addons/
- They are mounted to
/mnt/extra-addons - Included in
addons_pathviaodoo.conf
- Edit:
./conf/odoo.conf
-
Examples:
- Database settings
- Log levels
-
Rebuild the container if required
If you update dev container files:
- Open Command Palette
- Select Remote-Containers: Rebuild Container