From e808daee55b061892468ff1ba2d870a039e5fa65 Mon Sep 17 00:00:00 2001 From: Hai Lang Date: Fri, 22 May 2026 09:54:15 +0700 Subject: [PATCH 1/3] chore(.gitignore): vim files --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 8890419..354d9a8 100644 --- a/.gitignore +++ b/.gitignore @@ -215,3 +215,7 @@ __marimo__/ # Streamlit .streamlit/secrets.toml + +# VIM files +.*.sw? +.*.un~ From 508441d20f2a6c0e799a2bd274573052c1cee8d6 Mon Sep 17 00:00:00 2001 From: Hai Lang Date: Fri, 22 May 2026 09:56:49 +0700 Subject: [PATCH 2/3] feat(update): support multi-db foodcoop12 project is a saas and it needs to update multiple databases each deployment time. This is to suppor that. Forge ID: F#T67788 --- trobz_deploy/command/update.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/trobz_deploy/command/update.py b/trobz_deploy/command/update.py index a02e3d5..ad86c1f 100644 --- a/trobz_deploy/command/update.py +++ b/trobz_deploy/command/update.py @@ -21,7 +21,7 @@ @click.option( "--db", default=None, - help="Override the target database name (Odoo only).", + help="Override the target database name (Odoo only). Can be comma-separated for multiple databases.", ) @click.option( "-p", @@ -89,7 +89,9 @@ def update( # noqa: C901 eff_ssh_host: str | None = opts.get("ssh_host") eff_ssh_port: int | None = opts.get("ssh_port") eff_type: str = opts["type"] - eff_db: str = opts.get("db", instance_name) + eff_db: str | list[str] = opts.get("db", instance_name) + if isinstance(eff_db, str): + eff_db = eff_db.split(",") eff_repo_branch: str | None = opts.get("repo_branch") _req = opts.get("requirements") eff_requirements: list[str] = ([_req] if isinstance(_req, str) else _req) if _req else [] @@ -196,10 +198,12 @@ def run_hooks(hook_name: str) -> bool: try: if eff_type == "odoo": addons_path = get_addons_path(executor, instance_path) - executor.run( - f".venv/bin/click-odoo-update -d {eff_db} --addons-path={addons_path}", - cwd=instance_path, - ) + for db in eff_db: + click.secho(f"\nUpdating database {db!r}…", fg="green") + executor.run( + f".venv/bin/click-odoo-update -d {db} --addons-path={addons_path}", + cwd=instance_path, + ) executor.run(f"systemctl --user restart {instance_name}") except ExecutorError as exc: run_hooks("post-update") From 4e9ecd5daee6acd9effa38dd2570cc4e62ab389c Mon Sep 17 00:00:00 2001 From: Hai Lang Date: Fri, 22 May 2026 10:30:35 +0700 Subject: [PATCH 3/3] docs(update): support multiple databases Forge ID: F#T67788 --- site-docs/docs/commands/update.md | 5 ++++- site-docs/docs/configuration.md | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/site-docs/docs/commands/update.md b/site-docs/docs/commands/update.md index 7654cdf..84d3c88 100644 --- a/site-docs/docs/commands/update.md +++ b/site-docs/docs/commands/update.md @@ -23,7 +23,7 @@ deploy [--config FILE] update [] \ |--------|---------|-------------| | `--type` | auto | Deployment type: `odoo`, `python`, or `service` | | `-p`, `--port` | — | SSH port on the remote host | -| `--db` | `` | Override target database name (Odoo only) | +| `--db` | `` | Override target database name (Odoo only). Can be a list of comma-separated names | | `--ignore-hooks` | `False` | Skip all hook execution | | `--watch` | `False` | Watch service logs for working information | @@ -87,6 +87,9 @@ deploy update odoo-myproject-production # Override database name deploy update odoo-myproject-production --db myproject_alt +# Multiple database names +deploy update odoo-myproject-production --db myproject_alt,myproject_staging + # Custom SSH port deploy update odoo-myproject-staging -p 2222 diff --git a/site-docs/docs/configuration.md b/site-docs/docs/configuration.md index b67cbeb..34e83da 100644 --- a/site-docs/docs/configuration.md +++ b/site-docs/docs/configuration.md @@ -36,6 +36,11 @@ odoo-myproject-production: # Odoo only db: myproject # defaults to instance_name if omitted + # Multiple databases + db: + - myproject_staging + - myproject_integration + # python / service only exec_start: myapp.main:app # module path for python; verbatim for service build: npm ci && npm run build # service only @@ -66,7 +71,7 @@ odoo-myproject-production: | `ssh_port` | integer | all | SSH port on the remote host. | | `repo_url` | string | `configure` | Git repository URL. | | `type` | string | all | Deployment type: `odoo`, `python`, or `service`. | -| `db` | string | `update` | Target database name (Odoo only). | +| `db` | string or list of string | `update` | Target database name (Odoo only). Can be a list for multiple names. | | `exec_start` | string | `configure` | Entry point for python/service systemd unit. | | `build` | string | `configure`, `update` | Build command for `service` type. | | `hooks` | mapping | `update` | Lifecycle hooks — see [Hooks](hooks.md). |