Jump to
↵select↑↓navigateescclose

Production

From development to production

The packages a project builds, the deployable that services.odoo-nix and the container image both run, and how to choose between them.

Updated
Tags
  • production
  • deploy
  • packages
On this page

The development shell runs Odoo from your checkout. Production runs an immutable build of the same project, assembled in the Nix store from the same uv.lock, the same submodule commits and the same addons_path rules.

What a project builds

With odoo-nix.enable set, the flake-parts module adds these packages to the project (nix build .#<NAME>):

PackageWhat it is
defaultThe deployable: builtOdoo wrapped in the odoo command. Its bin/odoo handles db, module, project, shell and test and passes anything else to odoo-bin. services.odoo-nix.package and the container image take this one.
builtOdooThe assembled Odoo tree, with the production Python environment and an absolute addons_path, without the wrapper.
odooPythonEnvThe production virtualenv: real wheels, no dev tools, no guard rails.
odooDevEnv, odooTestEnvThe development and test virtualenvs (see Python dependencies and locks).
odooCliThe dev shell's odoo command, which runs the live checkout.
odooConfThe dev shell's synthesized odoo.conf.
odoo-lsThe language server the shell uses.
container-odooThe OCI image, with containers.enable.

The production odoo command has the same db subcommands as the dev shell, and project backup and project restore. module … and project update need a git checkout and modules.txt, so in a deployment they fail with a message.

The production environment carries the journald log graft (see Logging) and never the development guard rails.

Choose a target

TargetUse it whenRead
services.odoo-nixYou run NixOS. One Odoo instance per host or container, with PostgreSQL local or remote, nginx, secrets from files, migrations before every start and the journal.Run Odoo as a NixOS service, Operate a deployment, Logging
container-odooYou run containers. One image with Odoo, its HTTP workers, the websocket process and cron; PostgreSQL is external.The container image