Setting up Odoo 16 (Stable ) with Docker-Compose?
Feb 20, 2024
Hi Fellas — I have become a big fan of docker. Using it for quite a long time as of now and believe me, it is going to make your life a lot easier once you learn about it.
Today, I’ll be sharing the original docker-compose file that I have written after so many failed attempts to run the Odoo with postgres compatible version with ease.
version: '2'
services:
odoo:
image: odoo:16
depends_on:
- mydb
ports:
- "8069:8069"
volumes:
- odoo_data-latest:/var/lib/odoo
- /etc/odoo/odoo.conf:/etc/odoo/odoo.conf
- /mnt/custom_addons/ahson_pk:/mnt/custom_addons/ahson_pk
environment:
- HOST=mydb
- USER=odoo
- PASSWORD=myodoo
mydb:
image: postgres:15
environment:
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=myodoo
- POSTGRES_USER=odoo
volumes:
- db_data_16:/var/lib/postgresql/data
volumes:
odoo_data-latest:
db_data_16:
Please change the directories according to your requirements and make sure to rename the PVs.
Thanks for reading ❤.