Skip to content

Conversation

@amh-mw
Copy link

@amh-mw amh-mw commented Dec 12, 2023

This allows the system administrator to set the standard PostgreSQL environment variable POSTGRES_DB to change the name of the database created by default.

Fixes #358.

@amh-mw
Copy link
Author

amh-mw commented Dec 12, 2023

This is untested; I don't know what the odoo docker image build environment looks like.
🤦 Running docker build . --tag odoo:15 now.

@amh-mw
Copy link
Author

amh-mw commented Dec 12, 2023

POSTGRES_DB per Environment Variables section of https://hub.docker.com/_/postgres/

This allows the system administrator to set the standard PostgreSQL
environment variable POSTGRES_DB to change the name of the database
created by default.

Fixes odoo#358.
@amh-mw
Copy link
Author

amh-mw commented Dec 12, 2023

So I've tested a bit and now think this pull request is dead on arrival. Here's why:

--database doesn't have to be just one value, so it's not guaranteed to be reasonable to be passed to psycopg2.connect(dbname=...)

This is a side effect of the arguments parsed in entrypoint.sh being used for both wait-for-psql.py and the odoo binary.

@amh-mw amh-mw closed this Dec 12, 2023
@amh-mw amh-mw deleted the dbname branch December 12, 2023 23:23
@amh-mw amh-mw mentioned this pull request Dec 20, 2023
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

Successfully merging this pull request may close these issues.

allow change of the databe name via. Docker env var

1 participant