Thursday, March 30, 2017

Install Odoo 9 and Postgresql 9.3 inside docker container

Currently I'm working on a Odoo application where we installed our development environment in the Ubuntu/VMware. Apparently, I also like to know how to install the same setup using docker container and I tell you its not easy but luckily after few trial, here's my command that works perfectly.


1. Install postgres 9.3 with username = admin and password = admin. Port is default 5432 and the name of the container is postgres9.3, its makes sense. I'm not sure what is the --restart=always attribute but we can just leave that as is it.

docker run -d -e POSTGRES_USER=admin -e POSTGRES_PASSWORD=admin --name postgres9.3 -p 5432:5432 --restart=always postgres:9.3


2. Install Odoo 9 with default port 8069. The container name is odoo9 and its link with the postgres installed as above. That's it, very simple but it took me a while to figure it out. I'm still not an expert devops.

docker run -p 8069:8069 --name odoo9 --link postgres9.3:db -t odoo:9


mount custom addons
docker run -v /dev_path/svn/repo2/trunk:/mnt/extra-addons -p 8069:8069 --name vbroker --link postgres9.3:db -t ls/odoo9



Updated:
Everything works fine on the above setup however when I launch my code , it shows warning that need to install pika module. So I decided to get the Dockerfile from official odoo 9 installation from github. https://hub.docker.com/_/odoo/



build again using below command
$docker build -t <name> .

Eureka!

3 comments:

free online comma separating tool

https://delim.co/#