chore: replace docker-compose with nix process-compose for dev deps#64
Draft
Lakshyyaa wants to merge 2 commits into
Draft
chore: replace docker-compose with nix process-compose for dev deps#64Lakshyyaa wants to merge 2 commits into
Lakshyyaa wants to merge 2 commits into
Conversation
Aligns obix's dev loop with lana-bank's docker-free pattern, following es-entity#140 / job#114 / cala#729. Dev Postgres now runs as a native process via process-compose-flake; no Docker or podman required. - add process-compose-flake input; dev-env (CRC32-of-cwd -> dynamic PGPORT/PG_CON), pg-start (root setpriv drop + bounded readiness), setup-db-dev, mkPg/nix-deps-base; rewrite nextest-runner off podman - drop docker-compose/podman/podman-compose from nativeBuildInputs, add process-compose; export dev-env/setup-db-dev/nix-deps-base packages+apps; devShell shellHook evals dev-env - Makefile: start-deps/clean-deps/setup-db/reset-deps via process-compose + bounded wait; migrations folded into start-deps - tests/helpers.rs: read PG_CON from env (dynamic port) instead of hardcoded :5432 - ci/pipeline.yml: drop privileged: true (no container engine needed) - remove docker-compose.yml, nix/podman-runner.nix; gitignore .nix-deps/ Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c5b1761. Configure here.
Mirrors the follow-up commits on GaloyMoney/cala#729: - flake.nix: always derive DATABASE_URL from PGPORT (don't honor a stale inherited DATABASE_URL, which otherwise pins the old :5432 port) - Makefile: set -e in start-deps so an orchestrator failure fails fast - Makefile: drop dead test-in-ci target (CI calls `nix run .#nextest`) - ci/pipeline.yml: drop unused public_docker_registry ytt import Skipped: cala's doctest PG_CON fix (obix has no PG-connecting doctests) and the SQLX_OFFLINE removal (obix's nextest-runner already compiles online). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Follows GaloyMoney/es-entity#140, GaloyMoney/job#114, and GaloyMoney/cala#729. Migrates obix's dev loop off Docker/podman onto a Nix-managed
process-composePostgres, with per-worktree port allocation so multiple checkouts run their dev DB in parallel. No Docker required forsqlx-prepare, integration tests, ormake start-deps.Changes
process-compose-flakeinput;dev-env(CRC32-of-cwd → dynamicPGPORT/PG_CON),pg-start(rootsetprivdrop + bounded readiness),setup-db-dev,mkPg/nix-deps-base; rewritenextest-runneroff podman (XDG_CONFIG_HOME,_pgdev, bounded readiness wait, synchronous migrations); dropdocker-compose/podman/podman-compose, addprocess-compose; exportdev-env/setup-db-dev/nix-deps-basepackages+apps; devShellshellHookevalsdev-envstart-deps/clean-deps/setup-db/reset-depsvia process-compose + bounded wait; migrations folded intostart-depsPG_CONfrom env (dynamic port) instead of hardcoded:5432privileged: true(no container engine needed in CI)docker-compose.yml,nix/podman-runner.nix.nix-deps/Notes
book/, so the runner is es-entity's minus the mdbook steps. Migrations live at repo root (job_setup,obix_setup), sosetup-db-devruns a plainsqlx migrate run(nocd, unlike cala)..sqlxcache only covers lib queries; the test-only queries (TRUNCATE persistent_outbox_events, …) are not cached, sonextest-runnercompiles online against the live migrated PG.SQLX_OFFLINE=truestays incommonArgsonly for the offline cranenix flake check.:5432port and didn't touch.gitignore/ci/pipeline.yml/tests/helpers.rs(so it didn't solve multi-worktree). Mirrors how job#114 superseded its stale same-named branch.Verification (local)
nix run .#dev-env→ consistent per-worktree derivation (PGPORT=30800, matchingPG_CON) ✅alejandra -qc flake.nix✅make start-deps→ PG up via process-compose on derived port, both migrations applied ✅cargo nextest run --workspace→ 18 passed, 0 failed (online againstPG_CON) ✅make clean-deps→ torn down,.nix-deps/removed ✅🤖 Generated with Claude Code
Note
Medium Risk
Touches CI test bootstrap and DB connectivity for all integration tests; behavior change is intentional but failures would block dev and CI until deps are healthy.
Overview
Replaces Docker/podman dev Postgres with Nix
process-composeand a localpg-starthelper, somake start-deps, migrations, and CI tests no longer need a container engine.flake.nixaddsprocess-compose-flake,obix-dev-env(CRC32 of checkout path → per-worktreePGPORT/PG_CON),nix-deps-baseforcore-pg,setup-db-dev, and rewritesnextest-runnerto start PG via process-compose (rootsetprivto_pgdev, bounded readiness, sync migrations). Dev shellshellHookevalsdev-env. Podman/docker-compose tooling is removed.Makefilewiresstart-deps/clean-deps/reset-depsthroughnix runand folds migrations intostart-deps.tests/helpers.rsusesPG_CONfrom the environment instead of a fixed:5432. CI dropsprivileged: true.docker-compose.ymlandnix/podman-runner.nixare deleted;.gitignoreignores.nix-deps/.Reviewed by Cursor Bugbot for commit c4cdb6b. Bugbot is set up for automated code reviews on this repo. Configure here.