-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
parameterize db_name #426
base: master
Are you sure you want to change the base?
parameterize db_name #426
Conversation
can this please be merged? |
Thanks a lot. I hope it gets merged soon. |
Per https://www.postgresql.org/docs/current/app-initdb.html,
Hence, the startup sequence for this container checks for the default database to be available, verifying the readiness of the postgres container, rather than verifying the existence of a particular Odoo database -- of which there may be more than one. I already ran this down in #482 and closed my own pull request because I determined this is a bad idea. |
It can check for the database I command it to check, not the database the booting script decides to check. I'll share one set of credentials to the Odoo app, not 2, for the purpose of isolation and security. The current setup is a nightmare for multitenant hosting. |
I understand your reasoning, but in this pull request, the additional |
It's doing that already without the PR, which is... Less than ideal. |
@mohammed90 can you use https://docs.docker.com/build/building/multi-stage/ to accomplish your use case? If so can you close this PR? |
I don't understand how multi-stage build is supposed to help. Can you elaborate? |
I guess it does not need to be multi stage Dockerfile
Then build
Then you have your version. Note: quickly typed out, spelling and typos are free of charge. :) |
I fail to see how that is a proper solution. It's a hack at best. Appreciate the help, but I'm aiming to provide a solution that resolves root concern, not bandaid it. |
In case the database name is not
postgres
, the current image completely fails to run with the error:This PR parameterizes the db name so the admin can spin up the image without having to hack-around this limitation.
Fixes #394