Giter Site home page Giter Site logo

odoo-16-docker-compose's Introduction

Installing Odoo 16.0 with one command (Supports multiple Odoo instances on one server).

Quick Installation

Install docker and docker-compose yourself, then run the following to set up first Odoo instance @ localhost:10016 (default master password: minhng.info):

curl -s https://raw.githubusercontent.com/minhng92/odoo-16-docker-compose/master/run.sh | sudo bash -s odoo-one 10016 20016

and/or run the following to set up another Odoo instance @ localhost:11016 (default master password: minhng.info):

curl -s https://raw.githubusercontent.com/minhng92/odoo-16-docker-compose/master/run.sh | sudo bash -s odoo-two 11016 21016

Some arguments:

  • First argument (odoo-one): Odoo deploy folder
  • Second argument (10016): Odoo port
  • Third argument (20016): 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:10016 to access Odoo 16.0.

  • If you get any permission issues, change the folder permission to make sure that the container is able to access the directory:
$ sudo chmod -R 777 addons
$ sudo chmod -R 777 etc
$ sudo chmod -R 777 postgresql
  • If you want to start the server with a different port, change 10016 to another value in docker-compose.yml inside the parent dir:
ports:
 - "10016:8069"
  • To run Odoo container in detached mode (be able to close terminal without stopping Odoo):
docker-compose up -d
  • To Use a restart policy, i.e. configure the restart policy for a container, change the value related to restart key in docker-compose.yml file to one of the following:
    • no = Do not automatically restart the container. (the default)
    • on-failure[:max-retries] = Restart the container if it exits due to an error, which manifests as a non-zero exit code. Optionally, limit the number of times the Docker daemon attempts to restart the container using the :max-retries option.
    • always = Always restart the container if it stops. If it is manually stopped, it is restarted only when Docker daemon restarts or the container itself is manually restarted. (See the second bullet listed in restart policy details)
    • unless-stopped = Similar to always, except that when the container is stopped (manually or otherwise), it is not restarted even after Docker daemon restarts.
 restart: always             # run as a service
  • To 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#L60

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 20016 for live-chat on host.

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

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

docker-compose.yml

  • odoo:16.0
  • postgres:15

Odoo 16.0 screenshots after successful installation.

odoo-16-docker-compose's People

Contributors

minhng92 avatar mr-mania7 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

odoo-16-docker-compose's Issues

wkhtmltopdf

wkhtml2pdf needs to be updated, it still doesn't display the right way... like a missing logo, box etc...
is there a way of adding appropriate wkhtmltopdf in docker ?

custom addons

Hey, how can I add my custom addons?
I added my addon (rental) like in the image below and updated Apps, but nothing shows up.

image

Error restore database

Does anyone have this problem
i have restored my database from odoo sh. so using enterprise addons

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1987, in call
response = request._serve_db()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1583, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 134, in retrying
result = func()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1610, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1723, in dispatch
return self.request.registry['ir.http']._dispatch(endpoint)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 156, in _dispatch
result.flatten()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1098, in flatten
self.response.append(self.render())
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1090, in render
return request.env["ir.ui.view"]._render_template(self.template, self.qcontext)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 2128, in _render_template
return self.env['ir.qweb']._render(template, values)
File "/usr/lib/python3/dist-packages/odoo/tools/profiler.py", line 292, in _tracked_method_render
return method_render(self, template, values, **options)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 580, in _render
result = ''.join(rendering)
File "<190>", line 329, in template_190
odoo.addons.base.models.ir_qweb.QWebException: Error while render the template
ValueError: L'élément '' ne peut être localisé dans la vue parente
Template: web.webclient_bootstrap
Path: /t/t/t[1]/t[4]
Node:
2023-09-05 13:08:35,712 1 INFO werkzeug: 172.24.0.1 - - [05/Sep/2023 13:08:35] "GET /web HTTP/1.1" 500 - 157 0.191 4.618

Can't print any document

image
image
image

I don't know if this happens only to me 😟 when you try to print any document (quotation, sales order, purchase order,...) it keeps spinning and nothing happens. If you refresh the page, it still responds properly. I have tried all of your odoo repo (from 13 to 16) and the same things happens (or maybe I have done something wrongly because that task is pretty basic, I've used your 1-command script install).

Hope you doing well!

I have a problem editing the site

I am using Docker with a container for version 16 on Ubuntu 22.4 with nginx server by nginx manager
I did a search on the forum and found that a line should be added to the config file
add_header 'Content-Security-Policy' 'upgrade-insecure-requests';
But the problem was not solved

timezone issue

Hi
Currently on the message logs of odoo shows the wrong time already changed the user correctly to the time zone but in the logs keep showing the wrong time

image

image

Odoo Shell inside docker

Hi, currently I'm running your odoo-16-docker-compose, and it is running well and open normally via browser : http://localhost:10016

How can I go to Odoo shell, like I've read on odoo tutorial :
$ odoo shell -c odoo.conf -d db_training

I've tried with this command :
$ docker exec -it odoo16-docker-compose bash -c "odoo shell -c /etc/odoo/odoo.conf -d db_training"

but it gave an error :
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 64, in new
return cls.registries[db_name]
File "", line 2, in getitem
File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/tools/lru.py", line 34, in getitem
a = self.d[obj]
KeyError: 'db_training'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/odoo", line 8, in
odoo.cli.main()
File "/usr/lib/python3/dist-packages/odoo/cli/command.py", line 66, in main
o.run(args)
File "/usr/lib/python3/dist-packages/odoo/cli/shell.py", line 123, in run
self.shell(config['db_name'])
File "/usr/lib/python3/dist-packages/odoo/cli/shell.py", line 109, in shell
registry = odoo.registry(dbname)
File "/usr/lib/python3/dist-packages/odoo/init.py", line 104, in registry
return modules.registry.Registry(database_name)
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 66, in new
return cls.new(db_name)
File "", line 2, in new
File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 78, in new
registry.init(db_name)
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 159, in init
with closing(self.cursor()) as cr:
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 852, in cursor
return self._db.cursor()
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 740, in cursor
return Cursor(self.__pool, self.__dbname, self.__dsn)
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 267, in init
self._cnx = pool.borrow(dsn)
File "", line 2, in borrow
File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 668, in borrow
result = psycopg2.connect(
File "/usr/lib/python3/dist-packages/psycopg2/init.py", line 127, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?

issue with URL reverse proxy

HI
I was wondering if someone could shed somelight,
Currently i having nginx reverse proxy which goes to odoo but for some reason every time i try to login it goes back to the IP address

i also tried changing on odoo the web base url but it keeps changing back to the IP?

Thank you

for activation custom addons

I want to do like
python3 odoo-bin --addons-path=/Users/khantnyar/Downloads/odoo/odoo/addons -d odoo16db -i base -c odoo.conf

everything is fine with your compose but I want to add -I base how can I do this ?

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.