Skip to Content
Menu
This question has been flagged
1 Reply
6694 Views

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


Avatar
Discard
Related Posts Replies Views Activity
1
Feb 16
5353
3
Mar 15
7089
3
Feb 24
4252
4
Dec 23
41289
1
Jan 23
2149