odoo / docker

Other
932 stars 1.52k forks source link

Deploy Odoo on ubuntu 20.04 #389

Closed zoom2x closed 2 years ago

zoom2x commented 2 years ago

Please help with problem below:

root@tunglt-vm:~/docker/odoo14# docker-compose up -d Creating odoo14_db_1 ... done Creating odoo14_web_1 ... done root@tunglt-vm:~/docker/odoo14# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 94a3980ea6d1 odoo:14.0 "/entrypoint.sh odoo" 7 seconds ago Up 6 seconds 0.0.0.0:8069->8069/tcp, :::8069->8069/tcp, 8071-8072/tcp odoo14_web_1 b33d2ec466ac postgres:13 "docker-entrypoint.s…" 8 seconds ago Up 6 seconds 5432/tcp odoo14_db_1

and then

root@tunglt-vm:~/docker/odoo14/config# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 893b390b4dd3 odoo:14.0 "/entrypoint.sh odoo" 18 minutes ago Exited (1) 4 minutes ago odoo14_web_1 9aea8ec682a4 postgres:13 "docker-entrypoint.s…" 18 minutes ago Up 18 minutes 5432/tcp odoo14_db_1

zoom2x commented 2 years ago

i was deploy with

version: '3.1' services: web: image: odoo:14.0 depends_on:

secrets: postgresql_password: file: odoo_pg_pass

zoom2x commented 2 years ago

and now i try run again

root@tunglt-vm:~/docker/odoo14# docker-compose up Starting odoo14_db_1 ... done Starting odoo14_web_1 ... done Attaching to odoo14_db_1, odoo14_web_1 db_1 | db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization db_1 | db_1 | 2021-09-22 15:23:54.778 UTC [1] LOG: starting PostgreSQL 13.4 (Debian 13.4-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit db_1 | 2021-09-22 15:23:54.778 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 db_1 | 2021-09-22 15:23:54.778 UTC [1] LOG: listening on IPv6 address "::", port 5432 db_1 | 2021-09-22 15:23:54.783 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" db_1 | 2021-09-22 15:23:54.786 UTC [28] LOG: database system was shut down at 2021-09-22 15:19:09 UTC db_1 | 2021-09-22 15:23:54.790 UTC [1] LOG: database system is ready to accept connections db_1 | 2021-09-22 15:23:55.157 UTC [35] FATAL: password authentication failed for user "odoo14" db_1 | 2021-09-22 15:23:55.157 UTC [35] DETAIL: Role "odoo14" does not exist. db_1 | Connection matched pg_hba.conf line 99: "host all all all md5"

deyanira87 commented 2 years ago

You have to create a role user for postgres with the name: odoo14. I assume for the error that you have in your odoo.conf db_user = odoo14 , but the user doesn't exist.

I recommend you to change in the pg_hba.conf this line with this configuration: host all all 0.0.0.0/0 md5

All of this worked for me. :-)