What is the difference between the POSTGRES_DB environment used for the docker services and the DATABASE which is asked when configuring for first time in the localhost:8069/web/database/selector url? Shouldn’t be the same database? Why I need two databases?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Buchhaltung
- Lager
- PoS
- Project
- MRP
Diese Frage wurde gekennzeichnet
Hi Ian:
It is the same physical database. The Odoo database you create through the URL is a schema within the physical database. Odoo stores all it's data within that schema.
It is possible to create multiple Odoo databases in a single physical database.
Hi,
I need to understand which would be the recommendation for database configuration using docker-compose environment variables and the odoo.conf configuration file.
Case 1:
I am having some issues when trying to use ‘POSTGRES_DB=postgres’ in the docker-compose db service and then when web service load, it asked for a new database name, I would like to know why? after that I put postgres and it raises the next error:
“Database creation error: database ‘postgres’ already exists!”
Case 2:
If I decide to use a different name in the docker-compose db service “’POSTGRES_DB=development” and then if I configure the odoo.conf with db_name=development the bootstrap of odoo (8069) application never found the database and fail.
Please let me know which would be good practice to implement it.
13:07
The docker-compose file look like this:
version: '2'
services:
web:
image: odoo:13.0
depends_on:
- db
ports:
- "8069:8069"
volumes:
- odoo-web-data:/var/lib/odoo
- ./config:/etc/odoo
- ./addons:/mnt/extra-addons
env_file: ./config/.env
db:
image: postgres:10
volumes:
- odoo-db-data:/var/lib/postgresql/data/pgdata
env_file:
- ./config/.env
volumes:
odoo-web-data:
odoo-db-data:
-----------------------------
the env file:
USER=user_odoo
PASSWORD=development
POSTGRES_PASSWORD=development
POSTGRES_USER=user_odoo
POSTGRES_DB=postgres
PGDATA=/var/lib/postgresql/data/pgdata
Try this:
1. Change the odoo-db-data mapping to
odoo-db-data:/var/lib/postgresql/data
2. Remove the line with PGDATA=/var/lib/postgresql/data/pgdata from your .env file
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
RegistrierenVerknüpfte Beiträge | Antworten | Ansichten | Aktivität | |
---|---|---|---|---|
|
1
Sept. 20
|
11027 | ||
|
1
Sept. 20
|
3832 | ||
|
1
Sept. 20
|
2650 | ||
|
0
Okt. 20
|
2722 | ||
|
0
Okt. 20
|
2480 |