Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gustavovalverde opened this issue Aug 12, 2019 · 4 comments
Open

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

gustavovalverde opened this issue Aug 12, 2019 · 4 comments

Comments

@gustavovalverde
Copy link

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.

@d-fence
Copy link
Contributor

d-fence commented Jan 22, 2020

Did you try the solution in odoo/odoo#35669 ?
I mean, link a postgres container that use your unix socket ?

@gustavovalverde
Copy link
Author

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.

@rubdos
Copy link

rubdos commented Mar 29, 2021

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™.

@lathama
Copy link

lathama commented Apr 2, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants