1

I'm new to this and I do not know if I'm doing the right steps. The first thing I did was create a folder / addons, then inside this folder I created another folder / addons / celes_app, and within this last folder I have all my files (init.py, manifest.py, etc). Then I create the following containers:

docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:10

docker run -v /addons:/mnt/extra-addons -p 8069:8069 --name odoo --link db:db -t odoo

By doing so, the container is successfully created. I open a browser and enter port 8069, it asks me to create a new database, and when I create it I get the following error:

2018-11-28 23:45:46,936 1 INFO None odoo.service.db: Create database Prueba. 
2018-11-28 23:45:47,402 1 ERROR None odoo.service.db: CREATE DATABASE 
failed: Traceback (most recent call last): File "/usr/lib/python3/dist- 
packages/odoo/service/db.py", line 58, in _initialize_db odoo.modules.db.initialize(cr) 
File "/usr/lib/python3/dist-packages/odoo/modules/db.py", line 34, in initialize for i in odoo.modules.get_modules(): 
File "/usr/lib/python3/dist-packages/odoo/modules/module.py", line 408, in get_modules plist.extend(listdir(ad)) 
File "/usr/lib/python3/dist-packages/odoo/modules/module.py", line 401, in listdir for it in os.listdir(dir) 
PermissionError: [Errno 13] Permission denied: '/mnt/extra-addons' 2018-11-28 23:45:47,
422 1 ERROR None odoo.modules.loading: Database Prueba not initialized, you can force it with -i base 2018-11-28 23:45:47,
485 1 INFO Prueba odoo.sql_db: ConnectionPool(used=0/count=0/max=64): Closed 1 connections to 'dbname=Prueba user=odoo password=xxxx host=172.17.0.2 port=5432 sslmode=prefer'

Thank you

4

1 回答 1

2

请按照以下步骤操作,我希望此解决方案对您有用-

首先通过命令安装包含我的额外插件的本地文件夹-

$ docker run -v /path/to/your/local/folder:/mnt/extra-addons -p 8069:8069 --name odoo --link db:db -t odoo

然后检查您的本地文件夹是否安装在 Odoo 容器上的天气 -

$ docker exec -u root -it odoo /bin/bash

现在您已登录,(登录后)

$ cd /mnt/extra-addons
$ ls

您应该看到您的文件存在于您的本地/文件夹中。现在,它完成了,只需重新启动您的 docker odoo 服务器

停止-

$ sudo docker stop db
$ sudo docker stop odoo
$ sudo service docker stop

开始-

$ sudo service docker start
$ sudo docker start db
$ sudo docker start -a odoo

现在您可以从应用程序安装模块,数据库也应该可以正常工作。

于 2018-11-29T11:46:38.720 回答