rocketdoo 3.9.0__tar.gz → 3.9.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/LICENSE +2 -2
- {rocketdoo-3.9.0/rocketdoo.egg-info → rocketdoo-3.9.2}/PKG-INFO +8 -6
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/README.md +5 -3
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/pyproject.toml +1 -1
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/gitignore_manager.py +2 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/instance/config_manager.py +24 -1
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/instance/deployer_docker.py +214 -11
- rocketdoo-3.9.2/rocketdoo/core/instance/deployer_native.py +415 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/instance/secrets_store.py +6 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/mailpit.py +152 -9
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/models/instance.py +36 -3
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/pack.py +176 -12
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/port_validation.py +27 -7
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/unpack.py +78 -16
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/deploy_cli.py +14 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/gui/api/deploy_ops.py +8 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/gui/api/instances.py +14 -1
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/gui/api/pack_ops.py +18 -2
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/gui/static/index.html +11 -9
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/instance_cli.py +31 -8
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/mail_cli.py +45 -9
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/pack_environment.py +19 -3
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/.gitignore.jinja +4 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/instance/docker-compose.jinja +0 -3
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/instance/odoo.conf.jinja +2 -1
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/unpack_environment.py +38 -5
- {rocketdoo-3.9.0 → rocketdoo-3.9.2/rocketdoo.egg-info}/PKG-INFO +8 -6
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo.egg-info/SOURCES.txt +3 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_e2e_pack_unpack.py +18 -2
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_gui_api.py +76 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_gui_mail.py +10 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_gui_static.py +22 -0
- rocketdoo-3.9.2/tests/test_instance_docker.py +449 -0
- rocketdoo-3.9.2/tests/test_instance_native.py +805 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_mail_cli.py +167 -4
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_mailpit.py +22 -2
- rocketdoo-3.9.2/tests/test_mailpit_ports.py +350 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_models.py +37 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_pack_environment.py +561 -9
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_port_validation.py +84 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_secrets_hardening.py +8 -3
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_templates.py +72 -4
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_unpack_environment.py +281 -15
- rocketdoo-3.9.0/rocketdoo/core/instance/deployer_native.py +0 -207
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/MANIFEST.in +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/__init__.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/ci_cli.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/cli.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/cli_output.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/__init__.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/addons_path.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/compose.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/deploy/__init__.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/deploy/base.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/deploy/config_manager.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/deploy/module_packager.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/deploy/odoo_sh.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/deploy/vps.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/edition_setup.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/generator.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/gitman_config.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/instance/__init__.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/instance/ssh_utils.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/models/__init__.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/models/deploy.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/models/profiles.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/models/project.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/module_scanner.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/odoo_db.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/project_info.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/service.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/ssh_manager.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/core/traefik.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/docker_cli.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/gui/__init__.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/gui/api/__init__.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/gui/api/docker_ops.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/gui/api/gitman.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/gui/api/mail.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/gui/api/modules.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/gui/api/odoo.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/gui/api/project.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/gui/api/setup.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/gui/api/traefik_ops.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/gui/api/workspace.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/gui/server.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/gui_cli.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/init_project.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/scaffold.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/.devcontainer/devcontainer.json +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/.devcontainer/docker-compose.yaml +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/.vscode/launch.json +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/.vscode/launch.json.jinja +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/.vscode/settings.json +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/Dockerfile.jinja +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/addons/.gitkeep +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/ci/workflow.yaml.jinja +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/config/odoo.conf +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/config/odoo.conf.jinja +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/deploy/.deployignore +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/deploy/deploy.yaml +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/deploy/deploy.yaml.jinja +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/docker-compose.yaml.jinja +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/install_dependencies.sh +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/instance/Dockerfile.jinja +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/odoo_pg_pass +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/profiles/README.md +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/profiles/odoo15-ce.yaml +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/profiles/odoo15-ee.yaml +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/profiles/odoo16-ce.yaml +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/profiles/odoo16-ee.yaml +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/profiles/odoo17-ce.yaml +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/profiles/odoo17-ee.yaml +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/profiles/odoo18-ce.yaml +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/profiles/odoo18-ee.yaml +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/profiles/odoo19-ce.yaml +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/profiles/odoo19-ee.yaml +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/profiles/odoo20-ce.yaml +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/templates/profiles/odoo20-ee.yaml +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/traefik_cli.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo/welcome.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo.egg-info/dependency_links.txt +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo.egg-info/entry_points.txt +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo.egg-info/requires.txt +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/rocketdoo.egg-info/top_level.txt +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/setup.cfg +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_addons_path.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_ci_cli.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_cli_output.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_compose.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_core_contract.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_deploy_config_manager.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_docker_cli.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_e2e_scaffold.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_edition_setup.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_gitignore_manager.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_imports.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_module_scanner.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_odoo_db.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_profiles.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_project_info.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_ssh_manager.py +0 -0
- {rocketdoo-3.9.0 → rocketdoo-3.9.2}/tests/test_traefik.py +0 -0
|
@@ -57,7 +57,7 @@ If the Library as you received it specifies that a proxy can decide whether futu
|
|
|
57
57
|
<div RKD as ROCKETDOO V3=""></div>
|
|
58
58
|
|
|
59
59
|
Licencia: LGPL-3.0+
|
|
60
|
-
Versión: "3.9.
|
|
60
|
+
Versión: "3.9.2"
|
|
61
61
|
Autor: Horacio Montaño
|
|
62
|
-
Fecha:
|
|
62
|
+
Fecha: 30/10/2026
|
|
63
63
|
Descripción: Framework to development Odoo
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rocketdoo
|
|
3
|
-
Version: 3.9.
|
|
3
|
+
Version: 3.9.2
|
|
4
4
|
Summary: Framework for creating Odoo development environments with Docker and custom templates.
|
|
5
5
|
Author-email: Horacio Montaño <horaciomontano@hdmsoft.com.ar>
|
|
6
6
|
License: GNU LESSER GENERAL PUBLIC LICENSE
|
|
@@ -62,9 +62,9 @@ License: GNU LESSER GENERAL PUBLIC LICENSE
|
|
|
62
62
|
<div RKD as ROCKETDOO V3=""></div>
|
|
63
63
|
|
|
64
64
|
Licencia: LGPL-3.0+
|
|
65
|
-
Versión: "3.9.
|
|
65
|
+
Versión: "3.9.2"
|
|
66
66
|
Autor: Horacio Montaño
|
|
67
|
-
Fecha:
|
|
67
|
+
Fecha: 30/10/2026
|
|
68
68
|
Descripción: Framework to development Odoo
|
|
69
69
|
Requires-Python: >=3.10
|
|
70
70
|
Description-Content-Type: text/markdown
|
|
@@ -97,7 +97,7 @@ Odoo Development Framework
|
|
|
97
97
|
- "Horacio Montaño"
|
|
98
98
|
|
|
99
99
|
## Version:
|
|
100
|
-
- "3.9.
|
|
100
|
+
- "3.9.2"
|
|
101
101
|
|
|
102
102
|
----------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
103
103
|
|
|
@@ -464,12 +464,14 @@ This private information is as ephemeral as your environment.
|
|
|
464
464
|
Rocketdoo v3 integrates [Mailpit](https://github.com/axllent/mailpit), a local SMTP testing server. All emails sent by Odoo are captured in Mailpit's web UI instead of reaching real inboxes.
|
|
465
465
|
|
|
466
466
|
```bash
|
|
467
|
-
rkd mail on # Enable Mailpit
|
|
467
|
+
rkd mail on # Enable Mailpit; the output shows the host ports it was published on
|
|
468
468
|
rkd mail off # Disable Mailpit and restore Odoo mail settings
|
|
469
469
|
rkd mail status # Check if Mailpit is active
|
|
470
|
-
rkd mail open # Open
|
|
470
|
+
rkd mail open # Open the Mailpit web UI in your browser
|
|
471
471
|
```
|
|
472
472
|
|
|
473
|
+
Mailpit publishes its ports on the host at `1025` (SMTP) and `8025` (Web UI) when they are free. If another project already uses or declares them, `rkd mail on` picks the next free ones and prints them; `rkd mail off` leaves them written in `docker-compose.yaml`. Odoo always reaches Mailpit at `mailpit:1025` inside the Compose network, whatever the host port.
|
|
474
|
+
|
|
473
475
|
Mailpit is toggled by commenting/uncommenting its service block in `docker-compose.yaml` using special markers (`# rkd:mailpit`). When enabled, Odoo's SMTP configuration is automatically updated to route emails through Mailpit.
|
|
474
476
|
|
|
475
477
|
`rkd mail on`/`off` also write a `Mailpit (rkd)` record straight into the project's `ir.mail_server` table (Odoo's technical settings, *Outgoing Mail Servers*), so emails are captured with no extra manual setup. `on` creates or reactivates that record with `sequence = 1`; `off` archives it (never deletes it), leaving any of your own mail servers untouched. With a single database this is automatic; with more than one, pass `--db NAME` to `on`, `off`, or `status` — with several databases and no `--db`, nothing is written or read and the command tells you to re-run with it. If the `db` container isn't reachable (project stopped, Docker not running), the rest of the command still runs and it reports the reason; re-running `rkd mail on` once the project is up fixes it.
|
|
@@ -15,7 +15,7 @@ Odoo Development Framework
|
|
|
15
15
|
- "Horacio Montaño"
|
|
16
16
|
|
|
17
17
|
## Version:
|
|
18
|
-
- "3.9.
|
|
18
|
+
- "3.9.2"
|
|
19
19
|
|
|
20
20
|
----------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
21
21
|
|
|
@@ -382,12 +382,14 @@ This private information is as ephemeral as your environment.
|
|
|
382
382
|
Rocketdoo v3 integrates [Mailpit](https://github.com/axllent/mailpit), a local SMTP testing server. All emails sent by Odoo are captured in Mailpit's web UI instead of reaching real inboxes.
|
|
383
383
|
|
|
384
384
|
```bash
|
|
385
|
-
rkd mail on # Enable Mailpit
|
|
385
|
+
rkd mail on # Enable Mailpit; the output shows the host ports it was published on
|
|
386
386
|
rkd mail off # Disable Mailpit and restore Odoo mail settings
|
|
387
387
|
rkd mail status # Check if Mailpit is active
|
|
388
|
-
rkd mail open # Open
|
|
388
|
+
rkd mail open # Open the Mailpit web UI in your browser
|
|
389
389
|
```
|
|
390
390
|
|
|
391
|
+
Mailpit publishes its ports on the host at `1025` (SMTP) and `8025` (Web UI) when they are free. If another project already uses or declares them, `rkd mail on` picks the next free ones and prints them; `rkd mail off` leaves them written in `docker-compose.yaml`. Odoo always reaches Mailpit at `mailpit:1025` inside the Compose network, whatever the host port.
|
|
392
|
+
|
|
391
393
|
Mailpit is toggled by commenting/uncommenting its service block in `docker-compose.yaml` using special markers (`# rkd:mailpit`). When enabled, Odoo's SMTP configuration is automatically updated to route emails through Mailpit.
|
|
392
394
|
|
|
393
395
|
`rkd mail on`/`off` also write a `Mailpit (rkd)` record straight into the project's `ir.mail_server` table (Odoo's technical settings, *Outgoing Mail Servers*), so emails are captured with no extra manual setup. `on` creates or reactivates that record with `sequence = 1`; `off` archives it (never deletes it), leaving any of your own mail servers untouched. With a single database this is automatic; with more than one, pass `--db NAME` to `on`, `off`, or `status` — with several databases and no `--db`, nothing is written or read and the command tells you to re-run with it. If the `db` container isn't reachable (project stopped, Docker not running), the rest of the command still runs and it reports the reason; re-running `rkd mail on` once the project is up fixes it.
|
|
@@ -21,7 +21,9 @@ SENSITIVE_ENTRIES = [
|
|
|
21
21
|
(".rkd/secrets/", "VPS passwords"),
|
|
22
22
|
("odoo_pg_pass", "PostgreSQL password"),
|
|
23
23
|
(".rkd/instance.yaml", "deployment config with admin_passwd"),
|
|
24
|
+
(".rkd/deploy.yaml", "deploy targets with VPS host, user and SSH key path"),
|
|
24
25
|
("config/odoo.conf", "Odoo config with admin_passwd"),
|
|
26
|
+
("traefik/certs/acme.json", "Let's Encrypt account key and issued certificates"),
|
|
25
27
|
]
|
|
26
28
|
|
|
27
29
|
|
|
@@ -3,6 +3,7 @@ RocketDoo Instance - Configuration manager
|
|
|
3
3
|
Manages .rkd/instance.yaml for stage/prod deployments
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
|
+
import re
|
|
6
7
|
import secrets
|
|
7
8
|
import string
|
|
8
9
|
from pathlib import Path
|
|
@@ -74,6 +75,18 @@ def _random_password(length: int = 24) -> str:
|
|
|
74
75
|
return "".join(secrets.choice(alphabet) for _ in range(length))
|
|
75
76
|
|
|
76
77
|
|
|
78
|
+
# Role and database names reach psql inside an SQL statement and a remote
|
|
79
|
+
# shell command, in both deployers. Restricting them to a plain identifier is
|
|
80
|
+
# what makes both safe, instead of a quoting rule per destination. `fullmatch`
|
|
81
|
+
# rather than `$`, which also matches before a trailing newline (#248).
|
|
82
|
+
DB_IDENTIFIER = re.compile(r"[A-Za-z_][A-Za-z0-9_]{0,62}")
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def invalid_identifiers(*names: str) -> list[str]:
|
|
86
|
+
"""The given names that PostgreSQL could not take as a plain identifier."""
|
|
87
|
+
return [name for name in names if not DB_IDENTIFIER.fullmatch(name)]
|
|
88
|
+
|
|
89
|
+
|
|
77
90
|
class InstanceConfigManager:
|
|
78
91
|
def __init__(self, project_path: Path):
|
|
79
92
|
self.project_path = Path(project_path)
|
|
@@ -172,7 +185,16 @@ class InstanceConfigManager:
|
|
|
172
185
|
domain = Prompt.ask("Domain (e.g. erp.mycompany.com)")
|
|
173
186
|
traefik_email = Prompt.ask("Email for Let's Encrypt")
|
|
174
187
|
db_version = Prompt.ask("PostgreSQL version", default="16")
|
|
175
|
-
|
|
188
|
+
while True:
|
|
189
|
+
db_user = Prompt.ask("DB user", default=f"odoo_{env}")
|
|
190
|
+
db_name = Prompt.ask("Database name", default=db_user)
|
|
191
|
+
invalid = invalid_identifiers(db_user, db_name)
|
|
192
|
+
if not invalid:
|
|
193
|
+
break
|
|
194
|
+
# Checked here as well as at deploy time: otherwise a name
|
|
195
|
+
# PostgreSQL cannot take is only reported minutes into a deploy.
|
|
196
|
+
console.print(f"[red]Not a valid PostgreSQL identifier: {', '.join(invalid)}[/red]")
|
|
197
|
+
console.print("[dim]Up to 63 letters, digits and underscores, and cannot start with a digit.[/dim]")
|
|
176
198
|
generated_passwd = _random_password()
|
|
177
199
|
admin_passwd = Prompt.ask("Odoo master password", password=True, show_default=False, default=generated_passwd)
|
|
178
200
|
if admin_passwd == generated_passwd:
|
|
@@ -211,6 +233,7 @@ class InstanceConfigManager:
|
|
|
211
233
|
"traefik_email": traefik_email,
|
|
212
234
|
"db_version": db_version,
|
|
213
235
|
"db_user": db_user,
|
|
236
|
+
"db_name": db_name,
|
|
214
237
|
"admin_passwd": admin_passwd,
|
|
215
238
|
"use_enterprise": use_enterprise,
|
|
216
239
|
"use_gitman": use_gitman,
|
|
@@ -16,19 +16,32 @@ from pathlib import Path
|
|
|
16
16
|
from jinja2 import Environment, FileSystemLoader
|
|
17
17
|
from rich.console import Console
|
|
18
18
|
|
|
19
|
+
from rocketdoo.core.traefik import NETWORK as TRAEFIK_NETWORK
|
|
20
|
+
|
|
19
21
|
from .config_manager import (
|
|
20
22
|
LOG_LEVEL_BY_ENV,
|
|
21
23
|
MEMORY_BY_ENV,
|
|
22
24
|
PG_PROFILES,
|
|
23
25
|
WORKERS_BY_ENV,
|
|
26
|
+
invalid_identifiers,
|
|
24
27
|
)
|
|
25
|
-
from .secrets_store import ADMIN_PASSWD, PG_PASS, load, random_password, save
|
|
28
|
+
from .secrets_store import ADMIN_LOGIN_PASSWD, ADMIN_PASSWD, PG_PASS, load, random_password, save
|
|
26
29
|
from .ssh_utils import build_rsync_cmd, build_ssh_cmd, resolve_auth
|
|
27
30
|
|
|
28
31
|
console = Console()
|
|
29
32
|
|
|
30
33
|
_TEMPLATES_DIR = Path(__file__).parent.parent.parent / "templates" / "instance"
|
|
31
34
|
|
|
35
|
+
# Odoo's HTTP port inside the container, and how many two-second rounds
|
|
36
|
+
# to give PostgreSQL and Odoo to answer.
|
|
37
|
+
_HTTP_PORT = 8069
|
|
38
|
+
_DB_READY_RETRIES = 60
|
|
39
|
+
_HTTP_RETRIES = 45
|
|
40
|
+
|
|
41
|
+
# Written once the admin user's password has been replaced, so a step
|
|
42
|
+
# that failed is retried instead of skipped for good.
|
|
43
|
+
_ADMIN_PASSWORD_MARK = "rkd.admin_password_set"
|
|
44
|
+
|
|
32
45
|
|
|
33
46
|
class DockerInstanceDeployer:
|
|
34
47
|
"""
|
|
@@ -57,6 +70,9 @@ class DockerInstanceDeployer:
|
|
|
57
70
|
self.remote_path = env_config.get("remote_path", f"/opt/odoo-{env}")
|
|
58
71
|
self.auth = resolve_auth(vps, env, project_path)
|
|
59
72
|
|
|
73
|
+
self.db_user = env_config.get("db_user") or f"odoo_{env}"
|
|
74
|
+
self.db_name = env_config.get("db_name") or self.db_user
|
|
75
|
+
|
|
60
76
|
self.pg = PG_PROFILES[env_config.get("pg_profile", "medium")]
|
|
61
77
|
self.project_name = self._detect_project_name()
|
|
62
78
|
self.slug = self.project_name.replace("-", "_").replace(" ", "_")
|
|
@@ -67,38 +83,62 @@ class DockerInstanceDeployer:
|
|
|
67
83
|
"""Run full deployment. Returns True on success."""
|
|
68
84
|
console.print(f"\n[bold cyan]Deploying {self.env.upper()} to {self.host}[/bold cyan]\n")
|
|
69
85
|
|
|
86
|
+
invalid = invalid_identifiers(self.db_user, self.db_name)
|
|
87
|
+
if invalid:
|
|
88
|
+
console.print(f"[red]✗ Not a valid PostgreSQL identifier: {', '.join(invalid)}[/red]")
|
|
89
|
+
console.print(
|
|
90
|
+
"[dim]db_user and db_name may hold up to 63 letters, digits and underscores, "
|
|
91
|
+
"and cannot start with a digit.[/dim]"
|
|
92
|
+
)
|
|
93
|
+
return False
|
|
94
|
+
|
|
70
95
|
with tempfile.TemporaryDirectory() as tmp:
|
|
71
96
|
tmp_path = Path(tmp)
|
|
72
97
|
|
|
73
|
-
console.print("[dim]Step 1/
|
|
98
|
+
console.print("[dim]Step 1/7 — Rendering configuration files...[/dim]")
|
|
74
99
|
self._render_templates(tmp_path, allow_remote_lookup=not dry_run)
|
|
75
100
|
console.print("[green]✓[/green] Configuration files rendered")
|
|
76
101
|
|
|
77
102
|
if dry_run:
|
|
78
103
|
console.print("\n[yellow]DRY-RUN: Skipping transfer and build.[/yellow]")
|
|
79
104
|
self._show_generated_files(tmp_path)
|
|
105
|
+
console.print(
|
|
106
|
+
f"[dim]A real run would also create the database [bold]{self.db_name}[/bold], "
|
|
107
|
+
"install base in it and set the admin password.[/dim]\n"
|
|
108
|
+
)
|
|
80
109
|
return True
|
|
81
110
|
|
|
82
|
-
console.print("[dim]Step 2/
|
|
111
|
+
console.print("[dim]Step 2/7 — Preparing remote directory...[/dim]")
|
|
83
112
|
if not self._prepare_remote():
|
|
84
113
|
return False
|
|
85
114
|
console.print("[green]✓[/green] Remote directory ready")
|
|
86
115
|
|
|
87
|
-
console.print("[dim]Step 3/
|
|
116
|
+
console.print("[dim]Step 3/7 — Transferring files...[/dim]")
|
|
88
117
|
if not self._transfer(tmp_path):
|
|
89
118
|
return False
|
|
90
119
|
console.print("[green]✓[/green] Files transferred")
|
|
91
120
|
|
|
92
|
-
console.print("[dim]Step 4/
|
|
121
|
+
console.print("[dim]Step 4/7 — Building Docker image (this may take a while)...[/dim]")
|
|
93
122
|
if not self._build():
|
|
94
123
|
return False
|
|
95
124
|
console.print("[green]✓[/green] Image built")
|
|
96
125
|
|
|
97
|
-
console.print("[dim]Step 5/
|
|
126
|
+
console.print(f"[dim]Step 5/7 — Ensuring database {self.db_name}...[/dim]")
|
|
127
|
+
if not self._ensure_database():
|
|
128
|
+
return False
|
|
129
|
+
console.print("[green]✓[/green] Database ready")
|
|
130
|
+
|
|
131
|
+
console.print("[dim]Step 6/7 — Starting services...[/dim]")
|
|
98
132
|
if not self._start():
|
|
99
133
|
return False
|
|
100
134
|
console.print("[green]✓[/green] Services started")
|
|
101
135
|
|
|
136
|
+
console.print("[dim]Step 7/7 — Verifying Odoo answers...[/dim]")
|
|
137
|
+
if not self._verify_odoo_answers():
|
|
138
|
+
console.print("[red]✗ Odoo did not answer after the deploy[/red]")
|
|
139
|
+
return False
|
|
140
|
+
console.print("[green]✓[/green] Odoo answers")
|
|
141
|
+
|
|
102
142
|
return True
|
|
103
143
|
|
|
104
144
|
# ─── secrets ─────────────────────────────────────────────────────────────
|
|
@@ -165,7 +205,6 @@ class DockerInstanceDeployer:
|
|
|
165
205
|
|
|
166
206
|
creds = self._resolve_secrets(allow_remote_lookup=allow_remote_lookup)
|
|
167
207
|
|
|
168
|
-
db_user = self.cfg.get("db_user", f"odoo_{self.env}")
|
|
169
208
|
use_enterprise = self.cfg.get("use_enterprise", False)
|
|
170
209
|
use_gitman = self.cfg.get("use_gitman", False)
|
|
171
210
|
gitman_config = self.cfg.get("gitman_config", "gitman.yml")
|
|
@@ -178,7 +217,15 @@ class DockerInstanceDeployer:
|
|
|
178
217
|
"odoo_tag": self.cfg.get("odoo_tag", self.cfg.get("odoo_version", "17.0")),
|
|
179
218
|
"domain": self.cfg.get("domain", ""),
|
|
180
219
|
"traefik_email": self.cfg.get("traefik_email", ""),
|
|
181
|
-
"db_user": db_user,
|
|
220
|
+
"db_user": self.db_user,
|
|
221
|
+
"db_name": self.db_name,
|
|
222
|
+
# The conf used to say `db_password = False`, and the image's
|
|
223
|
+
# entrypoint only forwards --db_password when the conf does not
|
|
224
|
+
# define it: the secret the compose mounts never reached Odoo
|
|
225
|
+
# (#250). Declared here rather than left out so the password
|
|
226
|
+
# does not become a command-line argument on the VPS, visible
|
|
227
|
+
# in `ps` to every user on the host (#142).
|
|
228
|
+
"db_password": creds["pg_pass"],
|
|
182
229
|
"db_version": str(self.cfg.get("db_version", "16")),
|
|
183
230
|
"use_enterprise": use_enterprise,
|
|
184
231
|
"use_gitman": use_gitman,
|
|
@@ -227,9 +274,18 @@ class DockerInstanceDeployer:
|
|
|
227
274
|
|
|
228
275
|
# ─── SSH / transfer helpers ───────────────────────────────────────────────
|
|
229
276
|
|
|
230
|
-
def _ssh(self, command: str, agent_forward: bool = False, timeout: int = 600) -> bool:
|
|
277
|
+
def _ssh(self, command: str, agent_forward: bool = False, timeout: int = 600, input: str | None = None) -> bool:
|
|
231
278
|
cmd, env = build_ssh_cmd(self.auth, self.port, self.user, self.host, command, agent_forward=agent_forward)
|
|
232
|
-
|
|
279
|
+
try:
|
|
280
|
+
return subprocess.run(cmd, timeout=timeout, env=env, input=input, text=True).returncode == 0
|
|
281
|
+
except subprocess.TimeoutExpired:
|
|
282
|
+
# A build or a module install can legitimately take half an hour;
|
|
283
|
+
# what must not happen is the deploy ending in a traceback that
|
|
284
|
+
# says nothing about the remote process, which is still running.
|
|
285
|
+
console.print(
|
|
286
|
+
f"[red]Timed out after {timeout}s waiting for the VPS. The remote command may still be running.[/red]"
|
|
287
|
+
)
|
|
288
|
+
return False
|
|
233
289
|
|
|
234
290
|
def _rsync(self, local: str, remote: str, extra_opts: list[str] | None = None) -> bool:
|
|
235
291
|
cmd, env = build_rsync_cmd(self.auth, self.port, self.user, self.host, local, remote, extra_opts)
|
|
@@ -243,7 +299,16 @@ class DockerInstanceDeployer:
|
|
|
243
299
|
f"{self.remote_path}/extra-addons",
|
|
244
300
|
f"{self.remote_path}/{self.env}/config",
|
|
245
301
|
]
|
|
246
|
-
|
|
302
|
+
if not self._ssh(f"mkdir -p {' '.join(dirs)}"):
|
|
303
|
+
return False
|
|
304
|
+
|
|
305
|
+
# The compose declares this network as external, so Compose refuses to
|
|
306
|
+
# create it: on a VPS that has never run Traefik, every step from the
|
|
307
|
+
# database onwards fails with "network traefik-public declared as
|
|
308
|
+
# external, but could not be found".
|
|
309
|
+
return self._ssh(
|
|
310
|
+
f"docker network inspect {TRAEFIK_NETWORK} >/dev/null 2>&1 || docker network create {TRAEFIK_NETWORK}"
|
|
311
|
+
)
|
|
247
312
|
|
|
248
313
|
def _transfer(self, tmp: Path) -> bool:
|
|
249
314
|
# Dockerfile.{env}
|
|
@@ -258,6 +323,11 @@ class DockerInstanceDeployer:
|
|
|
258
323
|
console.print(f"[red]✗ Failed to transfer {self.env}/ config[/red]")
|
|
259
324
|
return False
|
|
260
325
|
|
|
326
|
+
# The PostgreSQL password arrives with rsync's default permissions,
|
|
327
|
+
# readable by every user on the VPS. Docker reads it as root to mount
|
|
328
|
+
# the secret, so restricting it costs nothing.
|
|
329
|
+
self._ssh(f"chmod 600 {self.remote_path}/{self.env}/odoo_pg_pass")
|
|
330
|
+
|
|
261
331
|
# gitman config (if present in tmp)
|
|
262
332
|
gitman_config = self.cfg.get("gitman_config", "")
|
|
263
333
|
if gitman_config:
|
|
@@ -288,6 +358,139 @@ class DockerInstanceDeployer:
|
|
|
288
358
|
start_cmd = f"cd {self.remote_path}/{self.env} && docker compose up -d"
|
|
289
359
|
return self._ssh(start_cmd)
|
|
290
360
|
|
|
361
|
+
def _resolve_admin_login_password(self) -> str:
|
|
362
|
+
"""
|
|
363
|
+
Return the password of Odoo's `admin` user, generating it once.
|
|
364
|
+
|
|
365
|
+
Not the master password: this one is the login. Installing `base`
|
|
366
|
+
leaves `admin` with the literal "admin" from
|
|
367
|
+
`base/data/res_users_data.xml`, and the only code that replaces it is
|
|
368
|
+
the web database manager, which `list_db = False` disables. Creating
|
|
369
|
+
the database without setting this would publish an Odoo behind the
|
|
370
|
+
instance's own domain with credentials that are in Odoo's source.
|
|
371
|
+
"""
|
|
372
|
+
stored = load(self.project_path, self.env).get(ADMIN_LOGIN_PASSWD)
|
|
373
|
+
if stored:
|
|
374
|
+
return stored
|
|
375
|
+
|
|
376
|
+
generated = random_password()
|
|
377
|
+
path = save(self.project_path, self.env, {ADMIN_LOGIN_PASSWD: generated})
|
|
378
|
+
console.print(f"[green]✔[/green] Generated the password of the admin user, stored in {path}")
|
|
379
|
+
# It is applied by the database step, which only touches a database
|
|
380
|
+
# whose admin password rkd never set. Saying so here is the
|
|
381
|
+
# difference between a stored credential and a stored guess: the
|
|
382
|
+
# secret file is gitignored, so a deploy from another clone lands
|
|
383
|
+
# exactly in that case.
|
|
384
|
+
console.print("[dim] Applied only to a database rkd initialises; an existing one keeps its own.[/dim]")
|
|
385
|
+
return generated
|
|
386
|
+
|
|
387
|
+
def _ensure_database(self) -> bool:
|
|
388
|
+
"""
|
|
389
|
+
Create the database Odoo will serve, install `base`, and set the
|
|
390
|
+
password of its `admin` user.
|
|
391
|
+
|
|
392
|
+
The compose creates the *role* by construction (POSTGRES_USER), but
|
|
393
|
+
nothing ever created the database, and `list_db = False` means there
|
|
394
|
+
is no web database manager to make one: the deploy finished with Odoo
|
|
395
|
+
running and nothing to serve (#250). Both halves are guarded
|
|
396
|
+
separately, so a redeploy neither recreates the database nor
|
|
397
|
+
reinstalls base, and a database left empty by an interrupted first
|
|
398
|
+
attempt gets initialised on the next run.
|
|
399
|
+
|
|
400
|
+
The database is created with Odoo's own parameters rather than the
|
|
401
|
+
cluster's defaults, for the same reason as the native path: the image
|
|
402
|
+
initialises its cluster from the host's locale, and `template1` is
|
|
403
|
+
mutable.
|
|
404
|
+
|
|
405
|
+
`exec -T` and `run -T` keep Docker from allocating a TTY, which would
|
|
406
|
+
wrap psql's output in carriage returns and make the emptiness checks
|
|
407
|
+
below answer wrongly.
|
|
408
|
+
"""
|
|
409
|
+
return self._ssh(
|
|
410
|
+
"bash -s",
|
|
411
|
+
timeout=1800,
|
|
412
|
+
input=(
|
|
413
|
+
# The braces are load-bearing: bash reads a compound command
|
|
414
|
+
# whole before running any of it, and `docker compose` reads
|
|
415
|
+
# the stdin it inherits -- which here is the script itself.
|
|
416
|
+
# Without them `up -d db` swallows everything below it and the
|
|
417
|
+
# step reports success having done nothing. Verified.
|
|
418
|
+
"{\n"
|
|
419
|
+
"set -e\n"
|
|
420
|
+
f'cd "{self.remote_path}/{self.env}"\n'
|
|
421
|
+
"docker compose up -d db\n"
|
|
422
|
+
f"for _ in $(seq 1 {_DB_READY_RETRIES}); do\n"
|
|
423
|
+
f' if docker compose exec -T db pg_isready -U "{self.db_user}" -q; then break; fi\n'
|
|
424
|
+
" sleep 2\n"
|
|
425
|
+
"done\n"
|
|
426
|
+
# -d postgres, the database the compose asks the image to
|
|
427
|
+
# create: without it psql defaults to one named after the
|
|
428
|
+
# role, which is the database being looked for.
|
|
429
|
+
f"if ! docker compose exec -T db psql -U {self.db_user} -d postgres"
|
|
430
|
+
f" -tAc \"SELECT 1 FROM pg_database WHERE datname = '{self.db_name}'\" | grep -q 1; then\n"
|
|
431
|
+
f" docker compose exec -T db createdb -U {self.db_user}"
|
|
432
|
+
f' -E UTF8 -T template0 --lc-collate=C -O "{self.db_user}" "{self.db_name}"\n'
|
|
433
|
+
"fi\n"
|
|
434
|
+
# `base` installed, not merely the table existing: Odoo
|
|
435
|
+
# commits ir_module_module seconds into the install and
|
|
436
|
+
# finishes minutes later, so an interrupted first attempt
|
|
437
|
+
# would otherwise look done forever. psql's own error on a
|
|
438
|
+
# database without the table is stderr, and an empty answer
|
|
439
|
+
# here means "install it" either way.
|
|
440
|
+
f'if [ -z "$(docker compose exec -T db psql -U {self.db_user} -d "{self.db_name}" -tAc'
|
|
441
|
+
" \"SELECT 1 FROM ir_module_module WHERE name = 'base' AND state = 'installed'\" 2>/dev/null)\" ]; then\n"
|
|
442
|
+
f' docker compose run --rm -T -l traefik.enable=false web odoo -d "{self.db_name}" -i base'
|
|
443
|
+
" --workers=0 --max-cron-threads=0 --stop-after-init --logfile= < /dev/null\n"
|
|
444
|
+
"fi\n"
|
|
445
|
+
# Its own guard, and a mark of its own: an install that
|
|
446
|
+
# succeeded while this step failed must be retried, or the
|
|
447
|
+
# admin user keeps the password `base` ships with.
|
|
448
|
+
f'if [ -z "$(docker compose exec -T db psql -U {self.db_user} -d "{self.db_name}" -tAc'
|
|
449
|
+
f' "SELECT 1 FROM ir_config_parameter WHERE key = \'{_ADMIN_PASSWORD_MARK}\'" 2>/dev/null)" ]; then\n'
|
|
450
|
+
f' docker compose run --rm -T -l traefik.enable=false web odoo shell -d "{self.db_name}"'
|
|
451
|
+
" --logfile= <<'RKD_PY'\n"
|
|
452
|
+
f"env.ref('base.user_admin').write({{'password': '{self._resolve_admin_login_password()}'}})\n"
|
|
453
|
+
f"env['ir.config_parameter'].sudo().set_param('{_ADMIN_PASSWORD_MARK}', '1')\n"
|
|
454
|
+
"env.cr.commit()\n"
|
|
455
|
+
"RKD_PY\n"
|
|
456
|
+
"fi\n"
|
|
457
|
+
"}\n"
|
|
458
|
+
),
|
|
459
|
+
)
|
|
460
|
+
|
|
461
|
+
def _verify_odoo_answers(self) -> bool:
|
|
462
|
+
"""
|
|
463
|
+
Confirm the deploy delivered something that works.
|
|
464
|
+
|
|
465
|
+
`docker compose up -d` returns once the containers are created, which
|
|
466
|
+
it does just as happily for an Odoo that exits a second later against
|
|
467
|
+
a database it cannot authenticate against -- the failure #250 is
|
|
468
|
+
about. Asked from inside the container, the check does not depend on
|
|
469
|
+
Traefik, DNS or a certificate being ready.
|
|
470
|
+
"""
|
|
471
|
+
return self._ssh(
|
|
472
|
+
"bash -s",
|
|
473
|
+
timeout=300,
|
|
474
|
+
input=(
|
|
475
|
+
# Braced for the same reason as the step above, and here it
|
|
476
|
+
# decides the verdict: `docker compose logs` would otherwise
|
|
477
|
+
# eat the `exit 1` below it and the deploy would call a
|
|
478
|
+
# silent Odoo a success.
|
|
479
|
+
"{\n"
|
|
480
|
+
f'cd "{self.remote_path}/{self.env}"\n'
|
|
481
|
+
f"for _ in $(seq 1 {_HTTP_RETRIES}); do\n"
|
|
482
|
+
f" if docker compose exec -T web curl -sf -o /dev/null http://127.0.0.1:{_HTTP_PORT}/web/login; then\n"
|
|
483
|
+
" exit 0\n"
|
|
484
|
+
" fi\n"
|
|
485
|
+
" sleep 2\n"
|
|
486
|
+
"done\n"
|
|
487
|
+
"echo 'Odoo did not answer; last lines of the web container log:' >&2\n"
|
|
488
|
+
"docker compose logs --tail 30 web >&2 || true\n"
|
|
489
|
+
"exit 1\n"
|
|
490
|
+
"}\n"
|
|
491
|
+
),
|
|
492
|
+
)
|
|
493
|
+
|
|
291
494
|
# ─── utils ───────────────────────────────────────────────────────────────
|
|
292
495
|
|
|
293
496
|
def _detect_project_name(self) -> str:
|