I have a docker-compose with environment parameters set to: USER = my
Also in odoo.conf : db_user = my
I have setup the database with also a role my:
postgres=# \l
Liste des bases de données
Nom | Propriétaire | Encodage | Collationnement | Type caract. | Droits d'accès
-----------+--------------+----------+-----------------+--------------+-----------------------
my_odoo_db | postgres | UTF8 | fr_FR.UTF-8 | fr_FR.UTF-8 | =Tc/postgres +
| | | | | postgres=CTc/postgres+
| | | | | my=CTc/postgres
my_odoo_db=# \du
Liste des rôles
Nom du rôle | Attributs | Membre de
-------------+---------------------------------------------------------------------------------+-----------
my | Pas d'héritage +| {}
| 100 connexions |
postgres | Superutilisateur, Créer un rôle, Créer une base, Réplication, Contournement RLS | {}
But when I up docker-compose and open a shell at the web container:
tail /etc/password
odoo:x:101:101::/var/lib/odoo:/usr/sbin/nologin
I have suspected the entrypoint\.sh\ and\ commented\ the\ default\ environment\ variables\ setting:
\#\#:\ \$\{HOST:=\$\{DB_PORT_5432_TCP_ADDR:='db'\}\}
\#\#:\ \$\{PORT:=\$\{DB_PORT_5432_TCP_PORT:=5432\}\}
\#\#:\ \$\{USER:=\$\{DB_ENV_POSTGRES_USER:=\$\{POSTGRES_USER:='odoo'\}\}\}
\#\#:\ \$\{PASSWORD:=\$\{DB_ENV_POSTGRES_PASSWORD:=\$\{POSTGRES_PASSWORD:='odoo'\}\}\}
Then\ I\ have\ suppressed\ in\ the\ odoo\ Dockerfile\ the\ final\ command\ to\ launch\ odoo\ without\ parameters:
\#\ Set\ default\ user\ when\ running\ the\ container
USER\ my
ENTRYPOINT\ \["/entrypoint.sh"]
#CMD ["odoo"]
But it is the same when I check the `/etc/password` file, still user odoo instead of my.
Where am I wrong? Is it possible or is odoo user hardcoded somewhere?
Here is all the places where I setup my user:
$ grep -rn my *
Dockerfiles/odoo/15.0/odoo.conf:238:db_user = my
Dockerfiles/odoo/15.0/Dockerfile:85:USER my
etc/odoo.conf:238:db_user = my
initdb/initdb.sql:3:CREATE ROLE my WITH NOSUPERUSER NOCREATEDB NOCREATEROLE NOINHERIT LOGIN NOREPLICATION CONNECTION LIMIT 100 ENCRYPTED PASSWORD 'my password';
initdb/initdb.sql:4:GRANT ALL ON DATABASE my_odoo_db TO my;
odoo_pg_user:1:my