Skip to content

Commit

Permalink
[FIX] database connection parameters
Browse files Browse the repository at this point in the history
Don't make the db-password mandatory, and don't default the database
host to localhost (use None instead).

This allows using a local database server, with ident authentication
configured.
  • Loading branch information
gurneyalex committed Jan 9, 2024
1 parent 65fbb29 commit 9073456
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ Contributors
------------

- Leonardo Pistone (Camptocamp)
- Alexandre Fayolle (Camptocamp)
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Unreleased
**Improvements**

**Build**
* Prevent text from bouncing in maintenance page
* allow connecting to a local database server without password (using ident)


0.11.0 (2023-09-12)
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Options
+-------------------+----------+---------------------------+-------------------------------------------------------------------+
| --db-port | -p | MARABUNTA_DB_PORT | Database port (defaults to 5432). |
+-------------------+----------+---------------------------+-------------------------------------------------------------------+
| --db-host | -H | MARABUNTA_DB_HOST | Database port (defaults to localhost). |
| --db-host | -H | MARABUNTA_DB_HOST | Database port (defaults to None). |
+-------------------+----------+---------------------------+-------------------------------------------------------------------+
| --mode | | MARABUNTA_MODE | Mode marabunta runs in for different envs. |
+-------------------+----------+---------------------------+-------------------------------------------------------------------+
Expand Down
4 changes: 2 additions & 2 deletions marabunta/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ def get_args_parser():
parser.add_argument('--db-password', '-w',
action=EnvDefault,
envvar='MARABUNTA_DB_PASSWORD',
required=True,
required=False,
help="Odoo's database password")
parser.add_argument('--db-port', '-p',
type=int,
default=os.environ.get('MARABUNTA_DB_PORT', 5432),
help="Odoo's database port")
parser.add_argument('--db-host', '-H',
default=os.environ.get('MARABUNTA_DB_HOST',
'localhost'),
None),
help="Odoo's database host")
parser.add_argument('--mode',
action=EnvDefault,
Expand Down

0 comments on commit 9073456

Please sign in to comment.