ERROR odoo odoo.modules.loading: Database odoo not initialized
在使用 docker-compose 部署 odoo 时报错
1
| ERROR odoo odoo.modules.loading: Database odoo not initialized, you can force it with -i base
|
解决方案
数据库容器增加环境变量
例如
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| version: '3.1'
services:
odoo: image: odoo:15.0 depends_on: - postgres ports: - "8069:8069" volumes: - ./odoo_web_data:/var/lib/odoo - ./config/odoo.conf:/etc/odoo/odoo.conf - ./addons:/mnt/extra-addons environment: - HOST=postgres - USER=odoo - PASSWORD=xxxxxxxxx
postgres: image: postgres:15rc2-alpine3.16 environment: - POSTGRES_DB=postgres - POSTGRES_PASSWORD=xxxxxxxxx - POSTGRES_USER=odoo - PGDATA=/var/lib/postgresql/data/pgdata volumes: - ./odoo_db_data:/var/lib/postgresql/data/pgdata
|
https://github.com/odoo/odoo/issues/27447
https://github.com/lefilament/ansible_role_odoo_docker/issues/7