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