Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
8585 มุมมอง

Hello community!
If I start my containers without using volumes the instance is created without problems.


version: '3.1'
services:
 web: 

    image: odoo:15.0

    depends_on:

     - db

    ports: - "8049:8069"

# volumes:

# - web-data:/var/lib/odoo

db:

 image: postgres:14.1

 environment: - POSTGRES_DB=postgres - POSTGRES_PASSWORD=odoo - POSTGRES_USER=odoo

# volumes:

# - db-data:/var/lib/postgresql/data/pgdata

#volumes:

# web-data:

# db-data:


 But when I want to name my volumes it gives me these error messages:


Starting odoo-jardineria2_db_1 ... done
Starting odoo-jardineria2_web_1 ... done
Attaching to odoo-jardineria2_db_1, odoo-jardineria2_web_1
db_1 | The files belonging to this database system will be owned by user "postgres".
db_1 | This user must also own the server process.
db_1 |
db_1 | The database cluster will be initialized with locale "en_US.utf8".
db_1 | The default database encoding has accordingly been set to "UTF8".
db_1 | The default text search configuration will be set to "english".
db_1 |
db_1 | Data page checksums are disabled.
db_1 |
db_1 | initdb: error: directory "/var/lib/postgresql/data" exists but is not empty
db_1 | If you want to create a new database system, either remove or empty
db_1 | the directory "/var/lib/postgresql/data" or run initdb
db_1 | with an argument other than "/var/lib/postgresql/data".
odoo-jardineria2_db_1 exited with code 1

I have previously used postgres for other tests with Odoo, does it influence my problem?
I am starting with docker-compose.

Thank you


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Please refer to the below answer for same issue:
https://stackoverflow.com/questions/62697071/docker-compose-postgres-upgrade-initdb-error-directory-var-lib-postgresql-da

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
4
มี.ค. 25
8438
1
ก.พ. 16
6309
3
ก.พ. 24
5626
how to Install odoo 15 with docker? แก้ไขแล้ว
4
ธ.ค. 23
46043
1
ม.ค. 23
3734