Skip to content

refactor: consolidate infra management into justfile + add mobile-dev#797

Merged
wpfleger96 merged 3 commits into
mainfrom
wpfleger/justfile-mobile-dev
May 29, 2026
Merged

refactor: consolidate infra management into justfile + add mobile-dev#797
wpfleger96 merged 3 commits into
mainfrom
wpfleger/justfile-mobile-dev

Conversation

@wpfleger96
Copy link
Copy Markdown
Collaborator

@wpfleger96 wpfleger96 commented May 29, 2026

Docker infrastructure startup logic (health checks, service startup, migration application) was duplicated across justfile, scripts/dev-setup.sh, and scripts/run-tests.sh. This makes the justfile's _ensure-services and _ensure-migrations recipes the single source of truth and refactors the scripts to delegate to them.

Adds a just mobile-dev recipe that handles the full mobile development stack in one command (Docker, relay, simulator, Flutter), and wires all relay/e2e/migrate recipes to auto-start infrastructure from a cold start.

  • _ensure-services / _ensure-migrations are the canonical infra guard — idempotent, sub-second when services are already running
  • dev-setup.sh delegates Docker health-wait to just _ensure-services instead of inlining its own wait_healthy() loop (~45 lines removed)
  • run-tests.sh replaces inline services_healthy() + ensure_services() + ensure_migrations() with a single ensure_infra() that calls just _ensure-migrations (~50 lines removed)
  • relay-web, relay-release, desktop-e2e-seed, desktop-e2e-integration wired to _ensure-migrations; migrate wired to _ensure-services
  • mobile-dev polls for relay readiness instead of a fixed sleep, cleans up the relay process on exit via trap
  • Removes dead recipes: web-install, web-install-ci (duplicates of desktop-install), desktop-app (alias for dev)
  • Updates 7 docs files to remove stale manual docker compose up instructions, reference just relay auto-start behavior, document just mobile-dev, and fix references to removed recipes

Comment thread justfile Outdated
`just relay` previously assumed Docker services were already running,
requiring manual `docker compose up` first. The desktop and mobile
workflows had the same gap — multiple manual steps across terminals.

Adds `_ensure-services` and `_ensure-migrations` private recipes that
idempotently start Docker services and wait for health. Wires `relay`
to depend on `_ensure-migrations` so it works from a cold start. Adds
`mobile-dev` that handles the full stack: Docker, relay (background),
iOS simulator, and `flutter run` — all in one command.
@wpfleger96 wpfleger96 force-pushed the wpfleger/justfile-mobile-dev branch from c706139 to d0d01e9 Compare May 29, 2026 21:28
Three places duplicated Docker health-check and migration logic:
justfile, dev-setup.sh, and run-tests.sh. Make the justfile's
_ensure-services and _ensure-migrations recipes the single source
of truth and have scripts delegate to them via hermit-managed just.

Also wires all relay/e2e/migrate recipes to auto-start infra, removes
dead recipes (web-install, web-install-ci, desktop-app), and adds a
mobile-dev recipe for one-command iOS development.
@wpfleger96 wpfleger96 changed the title feat: add shared infra recipes and just mobile-dev refactor: consolidate infra management into justfile + add mobile-dev May 29, 2026
Several docs referenced removed recipes (desktop-app), manual
docker compose steps that are now auto-handled by just relay,
or script internals that now delegate to justfile recipes.
@wpfleger96 wpfleger96 marked this pull request as ready for review May 29, 2026 22:23
@wpfleger96 wpfleger96 requested a review from a team as a code owner May 29, 2026 22:23
@wpfleger96 wpfleger96 merged commit 2a03851 into main May 29, 2026
16 checks passed
@wpfleger96 wpfleger96 deleted the wpfleger/justfile-mobile-dev branch May 29, 2026 22:26
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