Odoo build template — repos.yml per version branch
  • Python 88.9%
  • Shell 9.4%
  • Dockerfile 1.5%
  • HCL 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-12-01 16:37:23 +01:00
.forgejo/workflows [FIX] Run python workflow in venv 2026-11-25 16:00:03 +01:00
bin [DOC] No references to sat in documentation 2026-11-25 16:00:04 +01:00
catalog [RNM] Rename to odoo-deploy: odoo-forge too close to odooforge 2026-11-24 18:07:04 +01:00
docs [IMP] Can now use Tecnative egress-gatekeeper unchanged 2026-12-01 16:37:23 +01:00
scripts/completions [IMP] Do away with run. Use odoo-deploy start / status / stop 2026-11-26 14:30:39 +01:00
src/odoo_deploy [IMP] Can now use Tecnative egress-gatekeeper unchanged 2026-12-01 16:37:23 +01:00
tests [IMP] Can now use Tecnative egress-gatekeeper unchanged 2026-12-01 16:37:23 +01:00
.gitignore [RNM] Rename to odoo-deploy: odoo-forge too close to odooforge 2026-11-24 18:07:04 +01:00
bootstrap.sh [DOC] No references to sat in documentation 2026-11-25 16:00:04 +01:00
CHANGELOG.md [REL] v0.1.2 2026-11-30 14:52:33 +01:00
LICENSE [INZ] Start with the actual python tooling for odoo-build 2026-11-04 22:30:58 +01:00
pyproject.toml [REL] v0.1.2 2026-11-30 14:52:33 +01:00
python-version Add python-version (3.12) 2026-06-22 13:35:16 +02:00
README.md [DOC] Correct and streamline documentation 2026-11-30 14:45:09 +01:00
repos.yaml [IMP] Always use origin for the main remote of a repository 2026-11-06 17:08:07 +01:00
requirements.txt [INZ] Start with the actual python tooling for odoo-build 2026-11-04 22:30:58 +01:00
uv.lock [RNM] Rename to odoo-deploy: odoo-forge too close to odooforge 2026-11-24 18:07:04 +01:00

odoo-deploy

PyPI

Stateless CLI tool that consumes a per-company project repository and produces deployment-ready Odoo artifacts.

Status: pre-alpha. init, sync, info, aggregate, the action subcommands (start/stop/status/test/update/install), build (zip / docker / podman), server-side deploy, and the project-ops subcommands (lint, up/down/restart/logs/ps/compose, db …, module …) are implemented.

What it does

  • odoo-deploy init — creates a project repository (project.yaml + repos.yaml + stubs).
  • odoo-deploy sync — adds missing template files to an existing project without replacing customized files.
  • odoo-deploy deploy — installs staging/prod on a Debian server from a registry image, including runtime setup, service user, Compose, DB initialization, readiness checks, and systemd.
  • odoo-deploy aggregate — re-aggregates sources from repos.yaml into parts/ and symlinks found modules into addons/ (no hook framework, optional whitelist/blacklist).
  • odoo-deploy start | stop | status | test | update | install — operate on a dev Odoo instance against a project repo (start is always detached in dev).
  • odoo-deploy build zip | docker | podman — produce a deployment artifact. Images are tagged with the build date in ISO format (--tag for a custom tag, plus :latest) and pushed with --push to the registry named by image_base in project.yaml. See docs/global-design.md for the tagging and environment model.
  • odoo-deploy info — show supported Odoo versions and the catalog.
  • odoo-deploy install-dev-requirements — (Debian/Ubuntu only; run with sudo and the full path, since sudo's PATH lacks ~/.local/bin: sudo "$(command -v odoo-deploy)" install-dev-requirements) install the developer requirements: git, python build deps, and docker or podman with compose (--runtime podman).
  • odoo-deploy lint — run pre-commit against all files (port of invoke lint).
  • odoo-deploy up | down | restart | logs | ps | compose … — manage the compose environments defined in the project repo (compose/<env>.yaml); --env selects the environment (default devel). Ports of invoke start/stop/restart/logs.
  • odoo-deploy db reset | prepare | snapshot | restore — database operations inside the compose odoo service (ports of the doodba invoke tasks; Odoo ≥ 20 uses odoo db drop/duplicate, older uses click-odoo-*).
  • odoo-deploy module update-pot | uninstall — translation POT update (with .po date stripping + pre-commit) and module uninstall, inside the compose odoo service.

Container images ship wkhtmltopdf + paper-muncher (amd64) for PDF reports, and the image entrypoint dispatches any binary on PATH (doodba direxec-style), so docker compose run --rm odoo <cmd> works for odoo-bin subcommands and binaries installed in the project image, such as psql or click-odoo-* when included in the project requirements.

All artifacts are self-contained: no git-aggregate, git, or other build tooling is needed at runtime — all code is baked in at build time.

The catalog

catalog/<odoo_version>.yaml holds per-Odoo-version knowledge: minimal + recommended Python, tool-level pip pins (requirements_extra), notes. The catalog is the tool's only source of truth for version compatibility. Edit the files directly; the tool picks up changes on next run.

Supported Odoo versions today: 17.0, 18.0, 19.0, 20.0 (verify 17.0/18.0 against upstream release notes before relying on them).

Install

Prerequisites (needed before odoo-deploy exists): curl (to install uv) and system python3 ≥ 3.11 — Debian ≥ 12 (bookworm) / Ubuntu ≥ 24.04 LTS (noble) ship the latter by default; odoo-deploy install-dev-requirements checks both. uv manages all other Python interpreters, so no manual Python install is needed.

From PyPI, using uv (standalone installer):

curl -LsSf https://astral.sh/uv/install.sh | sh   # install uv once
uv tool install odoo-deploy                        # CLI lands in ~/.local/bin
uv tool update-shell                               # ensure ~/.local/bin is on PATH

(Alternative install methods and troubleshooting: docs/manual/, chapter 2.)

For development (editable install from a checkout):

git clone https://forgejo.openeyedev.eu/OpenEyeDev/odoo-deploy.git
cd odoo-deploy
uv venv .venv --python 3.12   # the version the developers use
uv pip install -e .

Then:

odoo-deploy --help
odoo-deploy info
odoo-deploy init --project acme --odoo-version 20.0

Architecture

See docs/manual/ for the hands-on manual (design → production, buildable to HTML/PDF), docs/architecture/ for the C4 model (Structurizr DSL + rendered diagrams, incl. the end-to-end deployment flow) and docs/cli-design.md for the full CLI design (subcommands, catalog format, init spec, build model). Operator runbooks live in docs/runbooks/ — e.g. installing a staging/prod instance from a prebuilt image with docker or podman compose, or a traditional systemd installation from a ZIP.

Legacy bin/ scripts

bin/build (the legacy aggregation script at this repo's root) is still the live script for existing instances. New projects should use odoo-deploy init + odoo-deploy aggregate instead of calling gitaggregate directly.

License

AGPL-3.0-or-later. See LICENSE.

Conventions

  • .yaml extension throughout (not .yml — the 3-letter abbreviation is a DOS-era remnant).
  • Tool runs on Python ≥3.11, independent of the Python versions in the catalog (which are for the Odoo instances being built).
  • Stateless tool. The project repository IS the state; the tool tracks no environments itself.
  • Flat subcommand structure — no dev <action> nesting. Action subcommands are top-level: odoo-deploy start, odoo-deploy install, etc.
  • Migrations between major Odoo versions are out of scope for now — each major version is its own deployment branch (deploy-<version>) and image line. See docs/global-design.md.