Giter VIP home page Giter VIP logo

odoo-12-docker-compose's Introduction

Quick install

Installing Odoo 12 with one command.

(Supports multiple Odoo instances on one server)

Install docker and docker-compose yourself, then run:

curl -s https://raw.githubusercontent.com/minhng92/odoo-12-docker-compose/master/run.sh | sudo bash -s odoo-one 10012 20012

to set up first Odoo instance @ localhost:10012 (default master password: minhng.info)

and

curl -s https://raw.githubusercontent.com/minhng92/odoo-12-docker-compose/master/run.sh | sudo bash -s odoo-two 11012 21012

to set up another Odoo instance @ localhost:11012 (default master password: minhng.info)

Some arguments:

  • First argument (odoo-one): Odoo deploy folder
  • Second argument (10012): Odoo port
  • Third argument (20012): live chat port

If curl is not found, install it:

$ sudo apt-get install curl
# or
$ sudo yum install curl

Usage

Start the container:

docker-compose up
  • Then open localhost:10012 to access Odoo 12.0. If you want to start the server with a different port, change 10012 to another value in docker-compose.yml:
ports:
 - "10012:8069"

Run Odoo container in detached mode (be able to close terminal without stopping Odoo):

docker-compose up -d

If you get the permission issue, change the folder permission to make sure that the container is able to access the directory:

$ git clone https://github.com/minhng92/odoo-12-docker-compose
$ sudo chmod -R 777 addons
$ sudo chmod -R 777 etc
$ mkdir -p postgresql
$ sudo chmod -R 777 postgresql

Increase maximum number of files watching from 8192 (default) to 524288. In order to avoid error when we run multiple Odoo instances. This is an optional step. These commands are for Ubuntu user:

$ if grep -qF "fs.inotify.max_user_watches" /etc/sysctl.conf; then echo $(grep -F "fs.inotify.max_user_watches" /etc/sysctl.conf); else echo "fs.inotify.max_user_watches = 524288" | sudo tee -a /etc/sysctl.conf; fi
$ sudo sysctl -p    # apply new config immediately

Custom addons

The addons/ folder contains custom addons. Just put your custom addons if you have any.

Odoo configuration & log

  • To change Odoo configuration, edit file: etc/odoo.conf.
  • Log file: etc/odoo-server.log
  • Default database password (admin_passwd) is minhng.info, please change it @ etc/odoo.conf#L55

Odoo container management

Run Odoo:

docker-compose up -d

Restart Odoo:

docker-compose restart

Stop Odoo:

docker-compose down

Live chat

In docker-compose.yml#L21, we exposed port 20012 for live-chat on host.

Configuring nginx to activate live chat feature (in production):

#...
server {
    #...
    location /longpolling/ {
        proxy_pass http://0.0.0.0:20012/longpolling/;
    }
    #...
}
#...

docker-compose.yml

  • odoo:12.0
  • postgres:9.5

Odoo 12 screenshots

odoo-12-welcome-docker

odoo-12-apps-docker

odoo-12-sales

odoo-12-docker-compose's People

Contributors

minhcs avatar minhng92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

odoo-12-docker-compose's Issues

connection remote database

Hi, how to connect to remote postgres? I add

db_host = $$$.$$$:$$$.$$
 db_port = 5432
 db_user = peasdasd
 db_password = sadasd#

in .conf but cannot connect and see 500 error,
my docker-compose is:
version: '2'
services:
odoo12:
image: odoo:12.0
ports:
- "8071:8069"
tty: true
command: -- --dev=reload
volumes:
- ../odoo-restaurantes:/mnt/extra-addons
- ./etc:/etc/odoo
restart: always # run as a service

Internal Server Error

Hi i've got the response

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.