Isolated Odoo 19 Docker environment for testing and development.
git clone git@github.com:seanthw/odoo-19-dockerized.git
cd odoo-19-dockerized
docker compose up -dAfter that, use:
docker compose down
docker compose up -d
docker compose ps
docker compose logs -f odoo-19
Follow these steps to add any custom module to this Odoo environment.
-
Copy the Module: Place your custom module's folder into the
test-addonsdirectory.# Example: cp -r /path/to/your/odoo-module ./test-addons/ -
Restart the Odoo Container: This is a critical step. Restarting the container will make Odoo aware of the new module and, more importantly, it will automatically set the correct file ownership and permissions inside the container.
docker compose restart odoo-19
-
Update the Apps List: Once the container has restarted, log into your Odoo instance.
- Go to the Settings menu and click Activate the developer mode.
- Go to the Apps menu.
- Click the Update Apps List button in the top menu.
- Confirm the update in the dialog box.
-
Install the Module: Your module will now be visible. You can search for it by name and click Install. (Remember to remove the default "Apps" filter in the search bar to see all available modules).
You can customize the environment by creating a .env file in the root of the project. Copy the .env.example file to get started:
cp .env.example .envThen, modify the .env file with your desired credentials.
image: You can change the PostgreSQL version by modifying theimagetag indocker-compose.yml(e.g.,postgres:15).ports: The host port mapped to the container's port 5432. By default, it is5433:5432.
image: You can change the Odoo version by modifying theimagetag indocker-compose.yml(e.g.,odoo:18.0).ports: The host port mapped to the container's port 8069. By default, it is8070:8069.