Skip to content

chore: replace docker-compose with nix process-compose for dev deps#140

Draft
vindard wants to merge 1 commit into
mainfrom
chore/nix-process-compose-dev-deps
Draft

chore: replace docker-compose with nix process-compose for dev deps#140
vindard wants to merge 1 commit into
mainfrom
chore/nix-process-compose-dev-deps

Conversation

@vindard
Copy link
Copy Markdown
Contributor

@vindard vindard commented May 27, 2026

Summary

Aligns es-entity's dev tooling with lana-bank's docker-free pattern: contributors no longer need Docker (or podman) installed locally. start-deps now runs Postgres directly via process-compose-flake, with data stored under .nix-deps/.

  • Adds process-compose-flake flake input
  • Defines nix-deps-base (process-compose stack: core-pg + setup-db) and setup-db-dev packages
  • Updates nextest-runner to use the new stack instead of podman-compose-runner
  • Drops docker-compose.yml and nix/podman-runner.nix
  • Drops docker-compose, podman, podman-compose from nativeBuildInputs
  • Updates Makefile start-deps / clean-deps / setup-db to call nix run .#...

CI is unchanged: both .github/workflows/test.yml and ci/pipeline.yml already invoke nix run .#nextest, and the runner's internals are what we updated.

Refs

  • GaloyMoney/volcano-wip#772 — overall plan covering es-entity, job, and cala
  • Next up: replicate this template in GaloyMoney/job, then GaloyMoney/cala (cala adds an OTel-agent service)

Test plan

  • make start-deps brings up Postgres + auto-applies migrations under .nix-deps/core-pg/
  • cargo nextest run --workspace — all 171 tests pass against the new PG
  • cargo sqlx prepare --workspace --check succeeds
  • make clean-deps stops the stack and clears .nix-deps/
  • CI green (test + check-code workflows)

🤖 Generated with Claude Code

Align with lana-bank's docker-free dev tooling: contributors no longer need
Docker (or podman) installed. start-deps now runs Postgres directly via
process-compose-flake, with data stored under .nix-deps/.

Drops docker-compose.yml and nix/podman-runner.nix. CI surfaces (.github
workflows + Concourse pipeline) are unchanged — both already invoke
nix run .#nextest, whose internals now use the process-compose path.

Refs GaloyMoney/volcano-wip#772.
Comment thread flake.nix
bacon
postgresql
docker-compose
ytt
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we still need ytt in the dev shell. ci/repipe still uses ytt, but after this change nix develop no longer includes the tool needed to update the Concourse pipeline

Comment thread flake.nix
setup-db = {
command = "${setupDbDev}/bin/setup-db-dev";
depends_on.core-pg.condition = "process_healthy";
availability.exit_on_end = false;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes DB migrations racy. This makes setup-db behave like a background process (i.e. not blocking until it is done), so project is-ready --wait may return once migrations have started rather than after they have finished. Then tests can start before the fresh DB schema is ready.

@Lakshyyaa Lakshyyaa marked this pull request as draft May 29, 2026 13:59
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.

2 participants