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
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
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
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Sep 20
|
10702 | ||
|
1
Sep 20
|
3710 | ||
|
1
Sep 20
|
2543 | ||
|
0
Oct 20
|
2620 | ||
|
0
Oct 20
|
2374 |