A customized Docker environment for deploying Odoo 18 with a custom addons path and Caddy for automatic HTTPS.
- Dockerized Odoo 18: Runs the latest Odoo 18 Community Edition.
- PostgreSQL Database: Uses a PostgreSQL container for the database.
- Custom Addons: Includes a volume mount for your custom Odoo addons.
- Caddy Webserver: Acts as a reverse proxy and automatically provisions and renews SSL/TLS certificates (Let's Encrypt).
- Persistent Data: Uses Docker volumes to persist Odoo and database data.
-
Clone the repository:
git clone [https://github.com/radiksen/odoo18-docker-custom.git](https://github.com/radiksen/odoo18-docker-custom.git) cd odoo18-docker-custom -
Configure your environment: Copy the example environment file and customize it to your needs.
cp .env.example .env
Now, open the
.envfile and set yourODOO_MASTER_PASSWORD,DOMAIN,EMAIL, and other variables. -
Place your custom addons: Put your custom Odoo addons inside the
./addonsdirectory.
-
Start the services: Run the following command to build and start all in the background:
chmod +x start-odoo.sh ./start-odoo.sh
-
Access Odoo: Open your web browser and navigate to the domain you specified in the
.envfile (e.g.,https://odoo.your-domain.com). Thanks to Caddy, HTTPS should be working automatically. -
View logs: To see the logs from all services, run:
docker-compose logs -f
To view logs for a specific service (e.g., odoo):
docker-compose logs -f odoo
-
Stop the services: To stop all running containers:
docker-compose down
The main configuration is handled through the .env file, which is based on .env.example:
ODOO_MASTER_PASSWORD: The master password for creating and managing Odoo databases. Set a strong, secure password.DOMAIN: Your public domain name for Odoo. Caddy will use this to get an SSL certificate.EMAIL: Your email address, used by Let's Encrypt for certificate notifications.DB_HOST,DB_USER,DB_PASSWORD,DB_NAME: PostgreSQL connection details.ODOO_VERSION: The Odoo version to use (e.g.,18.0).