odoo-devops-tools 1.26.0__tar.gz → 1.27.0__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.
- {odoo_devops_tools-1.26.0 → odoo_devops_tools-1.27.0}/PKG-INFO +88 -69
- {odoo_devops_tools-1.26.0 → odoo_devops_tools-1.27.0}/README.md +85 -68
- {odoo_devops_tools-1.26.0 → odoo_devops_tools-1.27.0}/odoo_devops_tools/odoo_compose.py +179 -186
- {odoo_devops_tools-1.26.0 → odoo_devops_tools-1.27.0}/odoo_devops_tools.egg-info/PKG-INFO +88 -69
- odoo_devops_tools-1.27.0/odoo_devops_tools.egg-info/SOURCES.txt +25 -0
- {odoo_devops_tools-1.26.0 → odoo_devops_tools-1.27.0}/odoo_devops_tools.egg-info/entry_points.txt +0 -1
- odoo_devops_tools-1.27.0/odoo_devops_tools.egg-info/requires.txt +3 -0
- {odoo_devops_tools-1.26.0 → odoo_devops_tools-1.27.0}/odoo_devops_tools.egg-info/top_level.txt +1 -0
- {odoo_devops_tools-1.26.0 → odoo_devops_tools-1.27.0}/pyproject.toml +9 -2
- odoo_devops_tools-1.27.0/tests/__init__.py +0 -0
- odoo_devops_tools-1.27.0/tests/common.py +64 -0
- odoo_devops_tools-1.27.0/tests/conftest.py +73 -0
- odoo_devops_tools-1.27.0/tests/integration_support.py +87 -0
- odoo_devops_tools-1.27.0/tests/test_bundle.py +86 -0
- odoo_devops_tools-1.27.0/tests/test_cli.py +47 -0
- odoo_devops_tools-1.27.0/tests/test_completion.py +80 -0
- odoo_devops_tools-1.27.0/tests/test_docker.py +287 -0
- odoo_devops_tools-1.27.0/tests/test_docker_source.py +54 -0
- odoo_devops_tools-1.27.0/tests/test_git.py +152 -0
- odoo_devops_tools-1.27.0/tests/test_git_progress.py +46 -0
- odoo_devops_tools-1.27.0/tests/test_ini.py +187 -0
- odoo_devops_tools-1.27.0/tests/test_lifecycle.py +87 -0
- odoo_devops_tools-1.27.0/tests/test_venv.py +151 -0
- odoo_devops_tools-1.26.0/odoo_devops_tools.egg-info/SOURCES.txt +0 -10
- {odoo_devops_tools-1.26.0 → odoo_devops_tools-1.27.0}/LICENSE +0 -0
- {odoo_devops_tools-1.26.0 → odoo_devops_tools-1.27.0}/odoo_devops_tools/__init__.py +0 -0
- {odoo_devops_tools-1.26.0 → odoo_devops_tools-1.27.0}/odoo_devops_tools.egg-info/dependency_links.txt +0 -0
- {odoo_devops_tools-1.26.0 → odoo_devops_tools-1.27.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: odoo-devops-tools
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.27.0
|
|
4
4
|
Summary: Build reproducible Odoo workspaces from a single project definition.
|
|
5
5
|
Author: Roman Lacko
|
|
6
6
|
License-Expression: MIT
|
|
@@ -24,6 +24,8 @@ Classifier: Topic :: Software Development
|
|
|
24
24
|
Requires-Python: >=3.9
|
|
25
25
|
Description-Content-Type: text/markdown
|
|
26
26
|
License-File: LICENSE
|
|
27
|
+
Provides-Extra: test
|
|
28
|
+
Requires-Dist: pytest<10,>=8; extra == "test"
|
|
27
29
|
Dynamic: license-file
|
|
28
30
|
|
|
29
31
|
# odoo-compose
|
|
@@ -135,26 +137,24 @@ Add-Content -Path $PROFILE -Value 'odoo-compose completion powershell | Out-Stri
|
|
|
135
137
|
```
|
|
136
138
|
|
|
137
139
|
Restart your shell or reload its configuration to activate completion. For example,
|
|
138
|
-
`odoo-compose setup --sy<TAB>` suggests matching options such as `--sync`,
|
|
140
|
+
`odoo-compose docker setup --sy<TAB>` suggests matching options such as `--sync`,
|
|
139
141
|
`--sync-odoo`, `--sync-addons`, and `--sync-all`.
|
|
140
142
|
|
|
141
|
-
---
|
|
142
|
-
|
|
143
143
|
## Usage
|
|
144
144
|
|
|
145
145
|
`odoo-devops-tools` supports two development workflows:
|
|
146
146
|
|
|
147
|
-
- **Docker workflow (`odoo-compose`)** — run Odoo and PostgreSQL with the generated Docker Compose environment.
|
|
147
|
+
- **Docker workflow (`odoo-compose docker`)** — run Odoo and PostgreSQL with the generated Docker Compose environment.
|
|
148
148
|
- **Native development with venv (`odoo-compose venv`)** — run Odoo directly on the host using a generated Python virtual environment.
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
Every workspace command must specify its workflow explicitly (`docker` or `venv`); no implicit default is used. Both share the same `odoo-project.ini` project definition. `odoo-compose --help`, `odoo-compose --version` and `odoo-compose completion SHELL` remain global.
|
|
151
151
|
|
|
152
152
|
## 1. Docker workflow
|
|
153
153
|
|
|
154
154
|
Create a new workspace:
|
|
155
155
|
|
|
156
156
|
```bash
|
|
157
|
-
odoo-compose setup ./odoo19
|
|
157
|
+
odoo-compose docker setup ./odoo19
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
This creates `./odoo19/odoo-project.ini` with this initial content:
|
|
@@ -168,13 +168,13 @@ Then prepare and start the Docker Compose environment:
|
|
|
168
168
|
|
|
169
169
|
```bash
|
|
170
170
|
cd ./odoo19
|
|
171
|
-
odoo-compose up --build
|
|
171
|
+
odoo-compose docker up --build
|
|
172
172
|
```
|
|
173
173
|
|
|
174
174
|
Optionally initialize the Odoo database from the command line instead of through the web interface:
|
|
175
175
|
|
|
176
176
|
```bash
|
|
177
|
-
odoo-compose run -i base --without-demo=all --stop-after-init
|
|
177
|
+
odoo-compose docker run -i base --without-demo=all --stop-after-init
|
|
178
178
|
```
|
|
179
179
|
|
|
180
180
|
Docker Compose runs both Odoo and PostgreSQL. Odoo is available at http://localhost:8069.
|
|
@@ -183,8 +183,8 @@ Docker Compose runs both Odoo and PostgreSQL. Odoo is available at http://localh
|
|
|
183
183
|
> By default, generated Compose services use `restart: unless-stopped`; to prevent a development stack from automatically starting after a host or Docker restart, run:
|
|
184
184
|
>
|
|
185
185
|
> ```bash
|
|
186
|
-
> odoo-compose setup --set docker:restart=no
|
|
187
|
-
> odoo-compose up --build
|
|
186
|
+
> odoo-compose docker setup --set docker:restart=no
|
|
187
|
+
> odoo-compose docker up --build
|
|
188
188
|
> ```
|
|
189
189
|
|
|
190
190
|
### 1.1. Adding extra addons
|
|
@@ -206,8 +206,8 @@ branch = ${odoo:version}
|
|
|
206
206
|
Sync the addon repositories and regenerate the Docker environment:
|
|
207
207
|
|
|
208
208
|
```bash
|
|
209
|
-
odoo-compose setup --sync
|
|
210
|
-
odoo-compose up --build
|
|
209
|
+
odoo-compose docker setup --sync
|
|
210
|
+
odoo-compose docker up --build
|
|
211
211
|
```
|
|
212
212
|
|
|
213
213
|
The repositories are cloned into `ROOT/odoo-addons/` and bind-mounted into the Odoo container. Python dependencies from their `requirements.txt` files are included when rebuilding the Docker image.
|
|
@@ -215,13 +215,13 @@ The repositories are cloned into `ROOT/odoo-addons/` and bind-mounted into the O
|
|
|
215
215
|
Install the new modules:
|
|
216
216
|
|
|
217
217
|
```bash
|
|
218
|
-
odoo-compose run -i web_notify,helpdesk_mgmt --without-demo=all --stop-after-init
|
|
218
|
+
odoo-compose docker run -i web_notify,helpdesk_mgmt --without-demo=all --stop-after-init
|
|
219
219
|
```
|
|
220
220
|
|
|
221
221
|
For subsequent addon updates, use:
|
|
222
222
|
|
|
223
223
|
```bash
|
|
224
|
-
odoo-compose update
|
|
224
|
+
odoo-compose docker update
|
|
225
225
|
```
|
|
226
226
|
|
|
227
227
|
### 1.2. Running Odoo from workspace source
|
|
@@ -245,8 +245,8 @@ odoo_source = workspace
|
|
|
245
245
|
Sync the Odoo source and generate the Docker artifacts:
|
|
246
246
|
|
|
247
247
|
```bash
|
|
248
|
-
odoo-compose setup --sync
|
|
249
|
-
odoo-compose up --build
|
|
248
|
+
odoo-compose docker setup --sync
|
|
249
|
+
odoo-compose docker up --build
|
|
250
250
|
```
|
|
251
251
|
|
|
252
252
|
The resolved Odoo source is bind-mounted read-only at `/opt/odoo`. The Odoo Python source from the base image is removed while its installed dependencies remain available.
|
|
@@ -256,15 +256,15 @@ The resolved Odoo source is bind-mounted read-only at `/opt/odoo`. The Odoo Pyth
|
|
|
256
256
|
Enable Mailpit in the local Docker workflow when you need to inspect or test email without sending it to a real SMTP server:
|
|
257
257
|
|
|
258
258
|
```bash
|
|
259
|
-
odoo-compose setup --set docker:mailpit_enabled=true
|
|
260
|
-
odoo-compose up
|
|
259
|
+
odoo-compose docker setup --set docker:mailpit_enabled=true
|
|
260
|
+
odoo-compose docker up
|
|
261
261
|
```
|
|
262
262
|
|
|
263
263
|
Mailpit is available at http://localhost:8025 by default. When running multiple workspaces, override the host web UI port, for example:
|
|
264
264
|
|
|
265
265
|
```bash
|
|
266
|
-
odoo-compose setup --set docker:mailpit_enabled=true --set docker:mailpit_webui_port=8026
|
|
267
|
-
odoo-compose up
|
|
266
|
+
odoo-compose docker setup --set docker:mailpit_enabled=true --set docker:mailpit_webui_port=8026
|
|
267
|
+
odoo-compose docker up
|
|
268
268
|
```
|
|
269
269
|
|
|
270
270
|
The generated local Odoo configuration sends outgoing email to `mailpit:1025`. When Mailpit is enabled, local Docker SMTP connection settings (`smtp_server`, `smtp_port`, `smtp_ssl`, `smtp_user`, and `smtp_password`) are intentionally overridden; the deploy configuration keeps the values from `[config]` unchanged.
|
|
@@ -309,7 +309,7 @@ Each option is independent and optional. If an option is missing or empty, `odoo
|
|
|
309
309
|
Apply the updated resource limits and start the services. `up` regenerates the Compose configuration automatically, so no separate `setup` or image rebuild is necessary:
|
|
310
310
|
|
|
311
311
|
```bash
|
|
312
|
-
odoo-compose up
|
|
312
|
+
odoo-compose docker up
|
|
313
313
|
```
|
|
314
314
|
|
|
315
315
|
### 1.6. Creating a Docker deploy build context
|
|
@@ -319,13 +319,13 @@ Use `--create-docker-deploy` to generate a self-contained Docker build context f
|
|
|
319
319
|
Addon modules are staged into the build context so the resulting image does not depend on bind-mounted workspace sources:
|
|
320
320
|
|
|
321
321
|
```bash
|
|
322
|
-
odoo-compose setup --sync --create-docker-deploy
|
|
322
|
+
odoo-compose docker setup --sync --create-docker-deploy
|
|
323
323
|
```
|
|
324
324
|
|
|
325
325
|
When `[docker].odoo_source = workspace`, sync the Odoo source as well:
|
|
326
326
|
|
|
327
327
|
```bash
|
|
328
|
-
odoo-compose setup --sync --create-docker-deploy
|
|
328
|
+
odoo-compose docker setup --sync --create-docker-deploy
|
|
329
329
|
```
|
|
330
330
|
|
|
331
331
|
This additionally creates:
|
|
@@ -553,13 +553,13 @@ odoo-compose venv setup --sync --create-venv --create-bundle
|
|
|
553
553
|
When no output path is supplied, the bundle is written to:
|
|
554
554
|
|
|
555
555
|
```text
|
|
556
|
-
ROOT/
|
|
556
|
+
ROOT/bundles/ROOT-NAME-bundle.zip
|
|
557
557
|
```
|
|
558
558
|
|
|
559
559
|
You can also select an explicit output file:
|
|
560
560
|
|
|
561
561
|
```bash
|
|
562
|
-
odoo-compose venv setup --sync --create-venv --create-bundle ./artifacts/odoo18-production.
|
|
562
|
+
odoo-compose venv setup --sync --create-venv --create-bundle ./artifacts/odoo18-production-bundle.zip
|
|
563
563
|
```
|
|
564
564
|
|
|
565
565
|
#### 4.1.1. Including uncommitted changes
|
|
@@ -577,7 +577,7 @@ odoo-compose venv setup --sync --create-venv --create-bundle --allow-dirty-bundl
|
|
|
577
577
|
Copy the ZIP to the target machine and import it into an empty directory:
|
|
578
578
|
|
|
579
579
|
```bash
|
|
580
|
-
odoo-compose venv setup --create-from-bundle ./odoo18-production.
|
|
580
|
+
odoo-compose venv setup --create-from-bundle ./odoo18-production-bundle.zip \
|
|
581
581
|
--root ./odoo18-prod \
|
|
582
582
|
--set config:db_host=127.0.0.1 \
|
|
583
583
|
--set config:db_name=odoo \
|
|
@@ -626,11 +626,11 @@ my-project/
|
|
|
626
626
|
Then run the Docker workflow from the project directory:
|
|
627
627
|
|
|
628
628
|
```bash
|
|
629
|
-
python odoo_compose.py setup --sync
|
|
630
|
-
python odoo_compose.py up --build
|
|
629
|
+
python odoo_compose.py docker setup --sync
|
|
630
|
+
python odoo_compose.py docker up --build
|
|
631
631
|
```
|
|
632
632
|
|
|
633
|
-
For the native venv workflow,
|
|
633
|
+
For the native venv workflow, choose the `venv` prefix:
|
|
634
634
|
|
|
635
635
|
```bash
|
|
636
636
|
python odoo_compose.py venv setup --sync --create-venv
|
|
@@ -641,13 +641,13 @@ python odoo_compose.py venv run
|
|
|
641
641
|
|
|
642
642
|
## Runtime lifecycle
|
|
643
643
|
|
|
644
|
-
Use the same lifecycle commands with either
|
|
644
|
+
Use the same lifecycle commands with either workflow after provisioning the workspace with `setup`:
|
|
645
645
|
|
|
646
646
|
```bash
|
|
647
647
|
# Docker: generate Docker config and start the Compose stack
|
|
648
|
-
odoo-compose up --build
|
|
649
|
-
odoo-compose status
|
|
650
|
-
odoo-compose down
|
|
648
|
+
odoo-compose docker up --build
|
|
649
|
+
odoo-compose docker status
|
|
650
|
+
odoo-compose docker down
|
|
651
651
|
|
|
652
652
|
# Native: generate config and start Odoo in the background
|
|
653
653
|
odoo-compose venv up
|
|
@@ -655,9 +655,9 @@ odoo-compose venv status
|
|
|
655
655
|
odoo-compose venv down
|
|
656
656
|
```
|
|
657
657
|
|
|
658
|
-
`odoo-compose up` regenerates local workspace artifacts and then runs the equivalent of `docker compose up -d --wait`.
|
|
658
|
+
`odoo-compose docker up` regenerates local workspace artifacts and then runs the equivalent of `docker compose up -d --wait`.
|
|
659
659
|
|
|
660
|
-
`odoo-compose up --build` additionally builds the images (`docker compose up -d --build --wait`).
|
|
660
|
+
`odoo-compose docker up --build` additionally builds the images (`docker compose up -d --build --wait`).
|
|
661
661
|
|
|
662
662
|
Container orchestration remains with Docker Compose, and its CLI can still be used directly for advanced or service-specific operations.
|
|
663
663
|
|
|
@@ -667,9 +667,9 @@ Container orchestration remains with Docker Compose, and its CLI can still be us
|
|
|
667
667
|
|
|
668
668
|
## Commands
|
|
669
669
|
|
|
670
|
-
`odoo-compose` operates on Docker workspaces; `odoo-compose venv` operates on native Python virtualenv workspaces. Both use `ROOT/odoo-project.ini`, but generate their own workflow artifacts. Commands operate directly through the installed CLI; generated wrapper scripts are not required.
|
|
670
|
+
`odoo-compose docker` operates on Docker workspaces; `odoo-compose venv` operates on native Python virtualenv workspaces. Both use `ROOT/odoo-project.ini`, but generate their own workflow artifacts. Commands operate directly through the installed CLI; generated wrapper scripts are not required.
|
|
671
671
|
|
|
672
|
-
Running
|
|
672
|
+
Running `odoo-compose` without arguments displays help. Workspace commands require an explicit `docker` or `venv` prefix; bare commands such as `odoo-compose setup` are no longer accepted. Use `odoo-compose docker <command> --help` or `odoo-compose venv <command> --help` for command-specific help. The global `--version` option shows the installed CLI version. Use `--root ROOT` to select a workspace outside the current directory where supported.
|
|
673
673
|
|
|
674
674
|
### Overview
|
|
675
675
|
|
|
@@ -748,9 +748,9 @@ Alternatively, load the workspace definition from a local INI file, Git reposito
|
|
|
748
748
|
|
|
749
749
|
```bash
|
|
750
750
|
# Docker workflow:
|
|
751
|
-
odoo-compose setup /path/to/odoo-project.ini
|
|
752
|
-
odoo-compose setup 'git+git@github.com:company/repo.git//examples/odoo-project.ini?ref=main'
|
|
753
|
-
odoo-compose setup 'https://github.com/lck/odoo-devops-tools/blob/main/examples/odoo-project.ini'
|
|
751
|
+
odoo-compose docker setup /path/to/odoo-project.ini
|
|
752
|
+
odoo-compose docker setup 'git+git@github.com:company/repo.git//examples/odoo-project.ini?ref=main'
|
|
753
|
+
odoo-compose docker setup 'https://github.com/lck/odoo-devops-tools/blob/main/examples/odoo-project.ini'
|
|
754
754
|
|
|
755
755
|
# Native workflow:
|
|
756
756
|
odoo-compose venv setup /path/to/odoo-project.ini
|
|
@@ -824,7 +824,7 @@ Git source syntax: `git+REPO_URL//PATH/TO/PROJECT.ini?ref=REF`.
|
|
|
824
824
|
<dd><p>Remove all items from pip's wheel cache.</p></dd>
|
|
825
825
|
|
|
826
826
|
<dt><code>--create-bundle</code> <i>[BUNDLE]</i></dt>
|
|
827
|
-
<dd><p>Create a verified portable ZIP containing sources, a sanitized project INI and the wheelhouse (Venv only). Default output: <code>ROOT/
|
|
827
|
+
<dd><p>Create a verified portable ZIP containing sources, a sanitized project INI and the wheelhouse (Venv only). Default output: <code>ROOT/bundles/ROOT-NAME-bundle.zip</code>. Explicit relative paths are resolved from the current directory.</p></dd>
|
|
828
828
|
|
|
829
829
|
<dt><code>--allow-dirty-bundle</code></dt>
|
|
830
830
|
<dd><p>Allow bundle creation from repositories with uncommitted changes; otherwise dirty repositories abort the operation.</p></dd>
|
|
@@ -846,8 +846,8 @@ Git source syntax: `git+REPO_URL//PATH/TO/PROJECT.ini?ref=REF`.
|
|
|
846
846
|
|
|
847
847
|
```bash
|
|
848
848
|
# Docker workflow:
|
|
849
|
-
odoo-compose setup ./odoo19
|
|
850
|
-
odoo-compose setup ./odoo18 --set odoo:version=18.0
|
|
849
|
+
odoo-compose docker setup ./odoo19
|
|
850
|
+
odoo-compose docker setup ./odoo18 --set odoo:version=18.0
|
|
851
851
|
|
|
852
852
|
# Native workflow:
|
|
853
853
|
odoo-compose venv setup ./odoo19 --sync --create-venv
|
|
@@ -862,7 +862,7 @@ Prepare and start the selected workspace. Requires an existing `odoo-project.ini
|
|
|
862
862
|
|
|
863
863
|
```text
|
|
864
864
|
{odoo-compose|odoo-compose venv} up [--root ROOT]
|
|
865
|
-
odoo-compose up [--root ROOT] [--build] [--recreate]
|
|
865
|
+
odoo-compose docker up [--root ROOT] [--build] [--recreate]
|
|
866
866
|
```
|
|
867
867
|
|
|
868
868
|
**Options**
|
|
@@ -956,7 +956,7 @@ Run Odoo directly from the selected workspace. Docker uses a one-off container;
|
|
|
956
956
|
|
|
957
957
|
```bash
|
|
958
958
|
# Docker workflow:
|
|
959
|
-
odoo-compose run -i base --stop-after-init
|
|
959
|
+
odoo-compose docker run -i base --stop-after-init
|
|
960
960
|
|
|
961
961
|
# Native workflow:
|
|
962
962
|
odoo-compose venv run -i base --stop-after-init
|
|
@@ -992,7 +992,7 @@ Open an interactive Odoo shell. Like `run`, this uses a one-off container for Do
|
|
|
992
992
|
|
|
993
993
|
```bash
|
|
994
994
|
# Docker workflow:
|
|
995
|
-
odoo-compose shell
|
|
995
|
+
odoo-compose docker shell
|
|
996
996
|
|
|
997
997
|
# Native workflow:
|
|
998
998
|
odoo-compose venv shell
|
|
@@ -1031,7 +1031,7 @@ Update installed Odoo addons through `click-odoo-update`.
|
|
|
1031
1031
|
|
|
1032
1032
|
```bash
|
|
1033
1033
|
# Docker workflow:
|
|
1034
|
-
odoo-compose update --all
|
|
1034
|
+
odoo-compose docker update --all
|
|
1035
1035
|
|
|
1036
1036
|
# Native workflow:
|
|
1037
1037
|
odoo-compose venv update --all
|
|
@@ -1067,7 +1067,7 @@ Run Odoo with `--test-enable --stop-after-init` in either workflow.
|
|
|
1067
1067
|
|
|
1068
1068
|
```bash
|
|
1069
1069
|
# Docker workflow:
|
|
1070
|
-
odoo-compose test -i sale --test-tags /sale
|
|
1070
|
+
odoo-compose docker test -i sale --test-tags /sale
|
|
1071
1071
|
|
|
1072
1072
|
# Native workflow:
|
|
1073
1073
|
odoo-compose venv test -i sale --test-tags /sale
|
|
@@ -1105,7 +1105,7 @@ Create a PostgreSQL custom-format database dump.
|
|
|
1105
1105
|
|
|
1106
1106
|
```bash
|
|
1107
1107
|
# Docker workflow:
|
|
1108
|
-
odoo-compose backup-db
|
|
1108
|
+
odoo-compose docker backup-db
|
|
1109
1109
|
|
|
1110
1110
|
# Native only: select a specific version of the PostgreSQL client tools
|
|
1111
1111
|
export POSTGRES_BIN=/usr/lib/postgresql/16/bin
|
|
@@ -1156,9 +1156,9 @@ Restore a PostgreSQL custom-format dump into `[config].db_name` (Docker defaults
|
|
|
1156
1156
|
|
|
1157
1157
|
```bash
|
|
1158
1158
|
# Docker workflow:
|
|
1159
|
-
odoo-compose restore-db ./odoo-backups/pre-upgrade.dump
|
|
1160
|
-
odoo-compose restore-db --force --copy ./odoo-backups/pre-upgrade.dump
|
|
1161
|
-
odoo-compose restore-db --move ./odoo-backups/pre-upgrade.dump
|
|
1159
|
+
odoo-compose docker restore-db ./odoo-backups/pre-upgrade.dump
|
|
1160
|
+
odoo-compose docker restore-db --force --copy ./odoo-backups/pre-upgrade.dump
|
|
1161
|
+
odoo-compose docker restore-db --move ./odoo-backups/pre-upgrade.dump
|
|
1162
1162
|
|
|
1163
1163
|
# Native only: optionally override PostgreSQL client location
|
|
1164
1164
|
export POSTGRES_BIN=/usr/lib/postgresql/16/bin
|
|
@@ -1200,7 +1200,7 @@ Archive the selected database's filestore as a `.tar.gz` file.
|
|
|
1200
1200
|
|
|
1201
1201
|
```bash
|
|
1202
1202
|
# Docker workflow:
|
|
1203
|
-
odoo-compose backup-filestore
|
|
1203
|
+
odoo-compose docker backup-filestore
|
|
1204
1204
|
|
|
1205
1205
|
# Native workflow:
|
|
1206
1206
|
odoo-compose venv backup-filestore
|
|
@@ -1241,8 +1241,8 @@ Restore the selected database's filestore from a `.tar.gz` archive. Stop Odoo be
|
|
|
1241
1241
|
|
|
1242
1242
|
```bash
|
|
1243
1243
|
# Docker workflow:
|
|
1244
|
-
odoo-compose restore-filestore ./odoo-backups/pre-upgrade-filestore.tar.gz
|
|
1245
|
-
odoo-compose restore-filestore --force ./odoo-backups/pre-upgrade-filestore.tar.gz
|
|
1244
|
+
odoo-compose docker restore-filestore ./odoo-backups/pre-upgrade-filestore.tar.gz
|
|
1245
|
+
odoo-compose docker restore-filestore --force ./odoo-backups/pre-upgrade-filestore.tar.gz
|
|
1246
1246
|
|
|
1247
1247
|
# Native workflow:
|
|
1248
1248
|
odoo-compose venv restore-filestore ./odoo-backups/pre-upgrade-filestore.tar.gz
|
|
@@ -1287,9 +1287,9 @@ export RESTIC_REPOSITORY=/srv/restic/odoo
|
|
|
1287
1287
|
export RESTIC_PASSWORD_FILE=/etc/restic/odoo-password
|
|
1288
1288
|
|
|
1289
1289
|
# Docker workflow:
|
|
1290
|
-
odoo-compose restic init
|
|
1291
|
-
odoo-compose restic snapshots
|
|
1292
|
-
odoo-compose restic check
|
|
1290
|
+
odoo-compose docker restic init
|
|
1291
|
+
odoo-compose docker restic snapshots
|
|
1292
|
+
odoo-compose docker restic check
|
|
1293
1293
|
|
|
1294
1294
|
# Native only: select a Restic executable instead of using PATH
|
|
1295
1295
|
export RESTIC_BIN=/opt/restic/restic
|
|
@@ -1331,7 +1331,7 @@ Back up the selected database's filestore as a Restic snapshot.
|
|
|
1331
1331
|
|
|
1332
1332
|
```bash
|
|
1333
1333
|
# Docker workflow:
|
|
1334
|
-
odoo-compose backup-filestore-restic
|
|
1334
|
+
odoo-compose docker backup-filestore-restic
|
|
1335
1335
|
|
|
1336
1336
|
# Native only: optional Restic executable override
|
|
1337
1337
|
export RESTIC_BIN=/opt/restic/restic
|
|
@@ -1374,7 +1374,7 @@ Restore the selected database's filestore from a Restic snapshot. Stop Odoo befo
|
|
|
1374
1374
|
|
|
1375
1375
|
```bash
|
|
1376
1376
|
# Docker workflow:
|
|
1377
|
-
odoo-compose restore-filestore-restic --force latest
|
|
1377
|
+
odoo-compose docker restore-filestore-restic --force latest
|
|
1378
1378
|
|
|
1379
1379
|
# Native workflow:
|
|
1380
1380
|
odoo-compose venv restore-filestore-restic --force latest
|
|
@@ -1407,9 +1407,9 @@ Neutralize a restored production database for development or testing, then execu
|
|
|
1407
1407
|
|
|
1408
1408
|
```bash
|
|
1409
1409
|
# Docker workflow:
|
|
1410
|
-
odoo-compose neutralize
|
|
1411
|
-
odoo-compose neutralize --dry-run
|
|
1412
|
-
odoo-compose neutralize --dry-run ./preview-sql
|
|
1410
|
+
odoo-compose docker neutralize
|
|
1411
|
+
odoo-compose docker neutralize --dry-run
|
|
1412
|
+
odoo-compose docker neutralize --dry-run ./preview-sql
|
|
1413
1413
|
|
|
1414
1414
|
# Native workflow:
|
|
1415
1415
|
odoo-compose venv neutralize
|
|
@@ -1462,10 +1462,10 @@ Neutralization is a separate step after restoring the database and filestore:
|
|
|
1462
1462
|
```bash
|
|
1463
1463
|
# Docker workflow:
|
|
1464
1464
|
docker compose stop odoo
|
|
1465
|
-
odoo-compose restore-db --copy ./odoo-backups/production.dump
|
|
1466
|
-
odoo-compose restore-filestore ./odoo-backups/production-filestore.tar.gz
|
|
1467
|
-
odoo-compose update --all
|
|
1468
|
-
odoo-compose neutralize
|
|
1465
|
+
odoo-compose docker restore-db --copy ./odoo-backups/production.dump
|
|
1466
|
+
odoo-compose docker restore-filestore ./odoo-backups/production-filestore.tar.gz
|
|
1467
|
+
odoo-compose docker update --all
|
|
1468
|
+
odoo-compose docker neutralize
|
|
1469
1469
|
docker compose up -d odoo
|
|
1470
1470
|
|
|
1471
1471
|
# Native workflow:
|
|
@@ -1696,7 +1696,7 @@ target = /mnt/exchange
|
|
|
1696
1696
|
The same share can be configured through the CLI:
|
|
1697
1697
|
|
|
1698
1698
|
```bash
|
|
1699
|
-
odoo-compose setup \
|
|
1699
|
+
odoo-compose docker setup \
|
|
1700
1700
|
--set docker.share.exchange:source=/mnt/nfs/exchange \
|
|
1701
1701
|
--set docker.share.exchange:target=/mnt/exchange
|
|
1702
1702
|
```
|
|
@@ -1727,3 +1727,22 @@ db_user = odoo
|
|
|
1727
1727
|
db_password = odoo
|
|
1728
1728
|
http_port = 8069
|
|
1729
1729
|
```
|
|
1730
|
+
|
|
1731
|
+
---
|
|
1732
|
+
|
|
1733
|
+
## Running tests
|
|
1734
|
+
|
|
1735
|
+
From the repository root:
|
|
1736
|
+
|
|
1737
|
+
Install the test dependency with `python -m pip install -e ".[test]"`, then run:
|
|
1738
|
+
|
|
1739
|
+
```bash
|
|
1740
|
+
pytest # All available tests
|
|
1741
|
+
pytest -m "not integration" # Fast tests only
|
|
1742
|
+
pytest -m integration # Integration tests only
|
|
1743
|
+
pytest tests/test_git.py # Specific test file
|
|
1744
|
+
```
|
|
1745
|
+
|
|
1746
|
+
Integration tests use Docker to prepare Odoo and PostgreSQL automatically.
|
|
1747
|
+
Unavailable platform-specific tests are reported as `SKIP`.
|
|
1748
|
+
GitHub Actions uses the same pytest commands. See [tests/README.md](tests/README.md).
|