Skip to content

Nix flake dev stack - #364

Closed
james-willdooit wants to merge 2 commits into
OCA:masterfrom
Godoo-Infra:nix-flake-dev-stack
Closed

james-willdooit wants to merge 2 commits into
OCA:masterfrom
Godoo-Infra:nix-flake-dev-stack

Conversation

@james-willdooit

Copy link
Copy Markdown

No description provided.

nix run brings up the four docker-compose services -- redis, the webhook
listener, the celery worker and the celery scheduler -- without docker,
supervised by process-compose, with the worker, bot and beat gated on a
redis readiness probe.

The bot is packaged for python 3.12, as the Dockerfile builds it. The
maintainer tools keep the Dockerfile's isolation in their own derivation,
sourced from a flake input pinned to the revision it installs, so a local
checkout can be substituted with --override-input. odoorpc is not in
nixpkgs and is packaged here.

nixpkgs is pinned to 26.05: unstable ships setuptools 83, which dropped
pkg_resources and breaks setuptools-odoo at import time. sentry-sdk is
held at 1.45.1 to honour the <2 cap in setup.py.

The wrapper reads the same .env, parsing it the way docker's env_file
does rather than sourcing it, since values such as GIT_NAME are not
shell-quoted. It rewrites the two container-only settings (BROKER_URI and
SIMPLE_INDEX_ROOT), keeps state in ./data so both ways of running share
the git clone cache, binds the listener to localhost as the compose port
mapping did, and moves the process-compose API off port 8080, which the
bot itself wants.

nix develop provides the same toolchain plus the test dependencies; the
full test suite passes in it.
Turn the nix section into ordered steps -- .env, warm build, start, expose,
configure the repository -- and add a section covering what a repository the
bot acts on needs: the access the bot account requires, the webhook events
that must be selected (issue comments in particular, since they carry the
commands), the branch naming the main branch operations expect, the CI and
branch protection the merge bot depends on, who may invoke commands, and
which labels and milestones the bot creates for itself.
@james-willdooit
james-willdooit deleted the nix-flake-dev-stack branch September 21, 2026 18:12
@james-willdooit
james-willdooit restored the nix-flake-dev-stack branch September 21, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant