[IMP] docker-compose: host paths in .env, override merged in

The OCA sources living outside this repo were mounted from a hardcoded
/media/snt/data/odoo in a local, untracked docker-compose.override.yml.
The host root now comes from ODOO_SRC in .env (gitignored, .env.example
added), so the mounts can live in docker-compose.yml itself and be shared.

Also parameterized: the published ports (ODOO_HTTP_PORT /
ODOO_LONGPOLLING_PORT) and the in-container addons path
(ODOO_ADDONS_PATH), the latter being the single source of truth for the
`command` and for manual `docker-compose run odoo odoo ...` invocations.

Missing variables fail with an explicit message instead of mounting empty
paths. `docker-compose config` resolves exactly as before.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
GitHub Copilot 2026-08-17 13:57:25 +02:00
parent b3999e2283
commit 3eb79e2431
4 changed files with 55 additions and 7 deletions

View file

@ -57,8 +57,8 @@ To check the three fixes on a PoS with a CashDro terminal:
configured host.
The Python side is covered by the tests. The base module lives outside this
repo, so the OCA sources have to be on the addons path (see
``docker-compose.override.yml``, which is local and untracked)::
repo, so the OCA sources have to be on the addons path (mounted by
``docker-compose.yml`` from ``ODOO_SRC``, set in your local ``.env``)::
docker-compose run --rm odoo odoo -c /etc/odoo/odoo.conf \
--addons-path=/mnt/extra-addons,/mnt/oca/pos,/usr/lib/python3/dist-packages/odoo/addons \

View file

@ -13,8 +13,8 @@ To check the three fixes on a PoS with a CashDro terminal:
configured host.
The Python side is covered by the tests. The base module lives outside this
repo, so the OCA sources have to be on the addons path (see
``docker-compose.override.yml``, which is local and untracked)::
repo, so the OCA sources have to be on the addons path (mounted by
``docker-compose.yml`` from ``ODOO_SRC``, set in your local ``.env``)::
docker-compose run --rm odoo odoo -c /etc/odoo/odoo.conf \
--addons-path=/mnt/extra-addons,/mnt/oca/pos,/usr/lib/python3/dist-packages/odoo/addons \