From f174e9cbcb679f86ab1c6174a733f8852105b49a Mon Sep 17 00:00:00 2001 From: David Harting Date: Thu, 2 Apr 2026 23:12:21 -0400 Subject: [PATCH 1/3] Add mise tooling and ephemeral dev database task - 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 --- .mise.toml | 3 +++ Taskfile.yml | 8 ++++++++ phpunit.xml | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .mise.toml diff --git a/.mise.toml b/.mise.toml new file mode 100644 index 00000000..ec36e37b --- /dev/null +++ b/.mise.toml @@ -0,0 +1,3 @@ +[tools] +node = "20" +postgres = "17" diff --git a/Taskfile.yml b/Taskfile.yml index 7903fac9..d9752230 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -16,6 +16,14 @@ tasks: - ./vendor/bin/pint - npm run format + dev:db:start: + desc: "Start an ephemeral Postgres container with laravel and laravel_test databases" + cmds: + - docker run -d --name davidharting-dev-db --rm -e POSTGRES_USER=laravel -e POSTGRES_HOST_AUTH_METHOD=trust -e POSTGRES_DB=laravel -p 5432:5432 postgres:17 + - docker exec davidharting-dev-db bash -c 'until pg_isready -U laravel; do sleep 1; done' + - docker exec davidharting-dev-db createdb -U laravel laravel_test + - docker attach davidharting-dev-db + dev:db:refresh: desc: "Migrate fresh and re-seed" cmds: diff --git a/phpunit.xml b/phpunit.xml index 256e5a30..ab68bfd5 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -23,7 +23,7 @@ - + From 44db4cd903d8b8e99fa96c01c34c12ccd02dfb86 Mon Sep 17 00:00:00 2001 From: David Harting Date: Fri, 3 Apr 2026 15:00:34 -0400 Subject: [PATCH 2/3] Add pitchfork for dev daemon orchestration 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 --- Taskfile.yml | 4 ++-- pitchfork.toml | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 pitchfork.toml diff --git a/Taskfile.yml b/Taskfile.yml index d9752230..fb0e60c7 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -2,8 +2,6 @@ version: "3" -dotenv: [".env.task"] - vars: # This is wonky because both Taskfile and docker stats use Go text/template # {{`{{`}} is to produce a "{{" literal that will make it to docker stats @@ -19,9 +17,11 @@ tasks: dev:db:start: desc: "Start an ephemeral Postgres container with laravel and laravel_test databases" cmds: + - docker rm -f davidharting-dev-db 2>/dev/null || true - docker run -d --name davidharting-dev-db --rm -e POSTGRES_USER=laravel -e POSTGRES_HOST_AUTH_METHOD=trust -e POSTGRES_DB=laravel -p 5432:5432 postgres:17 - docker exec davidharting-dev-db bash -c 'until pg_isready -U laravel; do sleep 1; done' - docker exec davidharting-dev-db createdb -U laravel laravel_test + - php artisan migrate:fresh --seed - docker attach davidharting-dev-db dev:db:refresh: diff --git a/pitchfork.toml b/pitchfork.toml new file mode 100644 index 00000000..95ff0b18 --- /dev/null +++ b/pitchfork.toml @@ -0,0 +1,17 @@ +[daemons.database] +run = "task dev:db:start" +ready_cmd = "pg_isready -h 127.0.0.1 -p 5432 -U laravel" + +[daemons.php] +run = "php artisan serve" +depends = ["database"] +ready_output = "Development Server started" + +[daemons.queue] +run = "php artisan queue:work" +depends = ["database"] +retry = true + +[daemons.vite] +run = "npm run dev" +ready_output = "ready in" From 90a0d20234d2a361c139dfa1e136d6aa93e66ec3 Mon Sep 17 00:00:00 2001 From: David Harting Date: Mon, 6 Apr 2026 21:00:44 -0400 Subject: [PATCH 3/3] ignore storage --- .prettierignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.prettierignore b/.prettierignore index 7a12b363..b2029add 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,5 +1,6 @@ package-lock.json composer.lock +storage/ resources/views/emails