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

allow change of the databe name via. Docker env var #358

Open
zer0divisi0n opened this issue Feb 22, 2021 · 3 comments
Open

allow change of the databe name via. Docker env var #358

zer0divisi0n opened this issue Feb 22, 2021 · 3 comments

Comments

@zer0divisi0n
Copy link

conn = psycopg2.connect(user=args.db_user, host=args.db_host, port=args.db_port, password=args.db_password, dbname='postgres')

would it be possible to change the last connection parameter dbname='postgres' to dbname=args.db_name to allow changing the postgres database name

@alexsegura
Copy link

Yeah, this hardcoded database name makes me crazy.

amh-mw added a commit to amh-mw/odoo-docker that referenced this issue 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 odoo#358.
@amh-mw
Copy link

amh-mw commented Dec 12, 2023

14.0 is EOL, so you're out of luck for that version, but I put up a patch for 15.0-17.0
PR DOA

amh-mw added a commit to amh-mw/odoo-docker that referenced this issue 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 odoo#358.
@amh-mw
Copy link

amh-mw commented Dec 12, 2023

would it be possible to change the last connection parameter dbname='postgres' to dbname=args.db_name to allow changing the postgres database name

It's fine that it is hardcoded to postgres here. It's just checking to make sure that the postgres service is available.

lathama added a commit to lathama/docker_library_docs that referenced this issue Apr 11, 2024
Offer an example Docker Compose that will set the database name for Odoo.

- odoo/docker#394
- odoo/docker#358
- odoo/docker#331
lathama added a commit to lathama/docker_library_docs that referenced this issue Apr 11, 2024
Offer an example Docker Compose that will set the database name for Odoo.

- odoo/docker#394
- odoo/docker#358
- odoo/docker#331

Additional changes

- Title case name Postgres
- Correct indentation of prior example
lathama added a commit to lathama/docker_library_docs that referenced this issue Apr 11, 2024
Offer an example Docker Compose that will set the database name for Odoo.

- odoo/docker#394
- odoo/docker#358
- odoo/docker#331

Additional changes

- Title case name Postgres
- Correct indentation of prior example
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 a pull request may close this issue.

3 participants