diff --git a/.mise.toml b/.mise.toml new file mode 100644 index 0000000..ec36e37 --- /dev/null +++ b/.mise.toml @@ -0,0 +1,3 @@ +[tools] +node = "20" +postgres = "17" diff --git a/.prettierignore b/.prettierignore index 7a12b36..b2029ad 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,5 +1,6 @@ package-lock.json composer.lock +storage/ resources/views/emails diff --git a/Taskfile.yml b/Taskfile.yml index 7903fac..fb0e60c 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 @@ -16,6 +14,16 @@ tasks: - ./vendor/bin/pint - npm run format + 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: desc: "Migrate fresh and re-seed" cmds: diff --git a/phpunit.xml b/phpunit.xml index 256e5a3..ab68bfd 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -23,7 +23,7 @@ - + diff --git a/pitchfork.toml b/pitchfork.toml new file mode 100644 index 0000000..95ff0b1 --- /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"