Odoo 18 Docker Setup
Defines a reproducible Docker Compose setup for Odoo 18 and PostgreSQL with an idempotent shell script for initialisation.
What this file does
Defines a reproducible Docker Compose setup for Odoo 18 and PostgreSQL with an idempotent shell script for initialisation.
When to use it
- Setting up a local Odoo 18 development environment
- Reproducing a clean Odoo instance with persistent data
- Automating database initialisation and service orchestration
- Learning a script-driven Odoo deployment pattern
Assumes this stack
Odoo 18 Docker Setup
Overview
This project provides a reproducible, script-driven setup for Odoo 18 and PostgreSQL using Docker Compose.
Configuration is controlled via .env and odoo.conf.
Files
- compose.yml – Docker Compose definition (Odoo + Postgres, persistent volumes, variable substitution).
- setup.sh – Idempotent setup script for database initialisation and service orchestration.
- .env – Environment variables (Postgres user, password, db, Odoo port).
- odoo.conf – Odoo server configuration.
- addons/ – Local Odoo addons directory (mounted in container).
Requirements
- Docker
- Docker Compose plugin (
docker compose) - Bash shell
Quick Start
-
Edit
.envSet your Postgres/Odoo details:POSTGRES_USER=odoo_dev POSTGRES_PASSWORD=yourpassword POSTGRES_DB=custom_odoo_db_1 ODEV_PORT=8018 -
Edit
odoo.confas needed Ensure port and paths align with.envand volumes. -
Run setup
./setup.sh -
Access Odoo Open http://localhost:8018 (or your configured port).
Script Logic (setup.sh)
- Loads
.envvariables - Brings down and cleans previous Docker containers/volumes
- Starts only the database, waits for readiness
- Runs Odoo initialisation (
--init=base) in an isolated step - Brings up full stack in detached mode
Useful Commands
-
View logs:
docker compose logs -f -
Stop services:
docker compose down
Notes
.envvalues must have no spaces before or after=.- Only Odoo 18 and PostgreSQL 17 tested.
- All data is persisted via Docker named volumes.
Troubleshooting
-
If setup fails:
- Check
.envfor whitespace or missing variables. - Inspect logs:
docker compose logs -f - Review output of
setup.shfor early errors.
- Check
Customisation
- To add Odoo modules:
Mount them in
addons/and adjust the setup script’s init command if needed.
Directory Structure
.
├── addons/
├── compose.yml
├── odoo.conf
├── setup.sh
└── .env
Useful Docker Commands
start docker services
systemctl start docker
docker run with logs
docker compose up -d && docker compose logs -f
docker down
docker compose down
docker list
docker ps -as
delete all docker instances
docker stop $(docker ps -a -q) docker rm $(docker ps -a -q) docker system prune docker system prune --all --volumes docker volume prune
docker compose logs
docker compose logs -f
What's inside
5 files, 4 configuration variables, 1 setup script, 6 useful Docker commands, troubleshooting section
Change this for your project
- Replace
POSTGRES_PASSWORD=yourpasswordwith your own password - Replace
ODEV_PORT=8018with your desired host port - Replace
POSTGRES_DB=custom_odoo_db_1with your database name
Where it goes
Keep in docs/ or alongside the feature. Agents read it to implement against a defined contract.
Worth borrowing
- Idempotent setup script that cleans previous state before initialising
- Two-step startup: database first, then Odoo initialisation in isolation
Related Documents
GPU Selection Guide for Large Language Models (LLMs)
Guides GPU selection for LLM inference, fine-tuning, and training by mapping model sizes, precision levels, and budgets to VRAM requirements.
Community AI Agent Skills Discovery Sources
Catalogs 50+ platforms, repositories, directories, and communities for discovering and sharing AI agent skills across multiple coding tools.
ReleaseKit - Technical Requirements Document
Specifies a Go library and CLI for release automation with conventional commit parsing, validation checks, and workflow orchestration.
api_llm Specification
Defines a workspace of thin HTTP API clients for major LLM providers with no abstraction layer and explicit developer control.