Skip to content

Local dev setup with mise and pitchfork#131

Open
davidharting wants to merge 3 commits into
mainfrom
dev-with-mise
Open

Local dev setup with mise and pitchfork#131
davidharting wants to merge 3 commits into
mainfrom
dev-with-mise

Conversation

@davidharting
Copy link
Copy Markdown
Owner

What changed

Adds mise for Node/Postgres version management and pitchfork for local dev daemon orchestration, replacing the need to manually start services in separate terminals.

  • .mise.toml: pins Node 20 and Postgres 17 (PHP managed separately via php.new)
  • pitchfork.toml: defines database, php, queue, and vite daemons with dependency ordering and retry
  • Taskfile.yml: dev:db:start now runs migrate:fresh --seed before attaching, cleans up stale containers on re-run

Why

Running the full local dev stack previously required 4 separate terminals. With pitchfork, pitchfork start --all starts everything in the right order — database first, then dependent services — with automatic retry if a service fails on first attempt.

pitchfork start --all   # start everything
pitchfork tui           # interactive dashboard
pitchfork logs php      # tail a specific service
pitchfork stop --all    # stop everything

Generated by Claude Code

David Harting and others added 3 commits April 2, 2026 23:12
- Add .mise.toml pinning Node 20 and Postgres 17 for local dev
- Add task dev:db:start: spins up an ephemeral Postgres 17 container
  with laravel and laravel_test databases, no password, no volume mount.
  Ctrl+C stops and auto-removes via --rm.
- Point phpunit.xml DB_DATABASE at laravel_test

PHP is managed separately via php.new rather than mise.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces the tmux-based bin/dev launcher with pitchfork.toml, which
manages all four dev services (database, php, queue, vite) as supervised
daemons with dependency ordering and automatic retry.

- pitchfork.toml: defines database, php, queue, vite daemons
  - database ready check via pg_isready (explicit IPv4) to avoid macOS
    localhost/IPv6 mismatch
  - php and vite use ready_output to avoid the same IPv4/IPv6 issue
  - queue has retry=true so it recovers if DB isn't ready on first attempt
  - php and queue depend on database
- Taskfile dev:db:start: run migrate:fresh --seed before docker attach
  so the DB is fully seeded before dependents start; also add docker rm -f
  cleanup so re-runs don't conflict on container name

Usage: pitchfork start --all / pitchfork tui / pitchfork stop --all

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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