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
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
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
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 9 20
|
11432 | ||
|
1
thg 9 20
|
4037 | ||
|
1
thg 9 20
|
2880 | ||
|
0
thg 10 20
|
2886 | ||
|
0
thg 10 20
|
2621 |