docker icon indicating copy to clipboard operation
docker copied to clipboard

[All] entrypoint.sh: Does not allow Unix Sockets

Open gustavovalverde opened this issue 6 years ago • 4 comments

In the actual definition of the entrypoint, if the database variables are not set, the default behavior is to connect to a database called "db". If everything is set to "False", Odoo's try to connect to a host called False, with False user and False password.

This behavior does not allow to use a Unix Sockets connection.

gustavovalverde avatar Aug 12 '19 17:08 gustavovalverde

Did you try the solution in https://github.com/odoo/odoo/issues/35669 ? I mean, link a postgres container that use your unix socket ?

d-fence avatar Jan 22 '20 09:01 d-fence

I'm using dockerdoo in the meanwhile, as I needed more customization through variables.

The solution in upstream is related, but a different problem. As far as I remember, setting the database to False (for the docker image) uses 'False' as a host, while the default Odoo behavior is using Unix Socket.

If I recall correctly this happens because the Postgres variable is also being changed to False, which overrides Odoo's behavior.

gustavovalverde avatar Jan 22 '20 12:01 gustavovalverde

This works quite well; I didn't get peer authentication to work with it though:

/usr/bin/docker run --rm \
    -e HOST="/var/run/postgresql/" \
    -e PORT="" \
    -p 8069:8069 \
    -v /var/run/postgresql:/var/run/postgresql \
    odoo

I.e., if you set the HOST to the domain socket path, it just works™.

rubdos avatar Mar 29 '21 13:03 rubdos

@gustavovalverde is this still an issue for you or have you found a solution? If you do not need this issue please close.

lathama avatar Apr 02 '24 18:04 lathama