Conversation
Add a --database param which defaults to postgres
Add a database param which is removed if not set
|
Per the comment here: This comment is correct, the db name can be a list of databases. Per the Odoo documentation, this list is a comma separated list: Patching the wait-for-psql.py file will let us split this out and wait for multiple databases. I will submit a fix. |
|
This now supports waiting for multiple databases. DATABASE=mydatabase,test will wait for mydatabase and test to be up before starting the Odoo container. |
|
As a note, we can now support multiple databases, and the timeout is non-configurable. You could imagine where you want, say, 20 databases, just the act of connecting to multiple may cause us to exceed the default timeout (which is set to 30, which should be plenty right now, and should not block this PR). However, we would probably want this to be configurable in the event someone has a lot of databases. I will address this as a separate PR if we continue to use this as opposed to the changes in #496 PR |
|
Sorry I had an issue here, I will resubmit this PR along with some additional changes that will address this in a better way, this one should not be merged. |
Per the discussion in this ticket:
#535
This pull request adds support for a specific database while maintaining the original functionality if a database name is not specified or the database argument is blank. This addresses the concern that specifying a database name would lock Odoo to the
postgrestableAdd a
DATABASE=mydatabaseenvironment variable to select a specific databaseTests and examples here:
#535 (comment)