add nix flake devshell and process-compose
mirrors youngstartup setup. flake provides php 8.4, composer, nodejs, postgresql, cypress, typescript, process-compose. shellHook seeds a per-repo postgres cluster at .postgres/. process-compose orchestrates postgres + backend (laravel) + vite (vue spa) for local dev. .envrc auto-loads the flake via direnv. mailpit and gitlab-ci-local omitted - not needed for tide blogging app.
This commit is contained in:
parent
91cc08614d
commit
d1df7a6a42
5 changed files with 165 additions and 0 deletions
37
process-compose.yaml
Normal file
37
process-compose.yaml
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
version: "0.5"
|
||||
|
||||
processes:
|
||||
postgres:
|
||||
command: postgres -D "$PGDATA" -k "$PGDATA" -c listen_addresses=127.0.0.1
|
||||
shutdown:
|
||||
signal: 2
|
||||
readiness_probe:
|
||||
exec:
|
||||
command: pg_isready -h "$PGDATA"
|
||||
initial_delay_seconds: 1
|
||||
period_seconds: 2
|
||||
|
||||
backend:
|
||||
command: php artisan serve --host=127.0.0.1 --port=8000
|
||||
working_dir: ./backend
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: process_healthy
|
||||
readiness_probe:
|
||||
http_get:
|
||||
host: 127.0.0.1
|
||||
port: 8000
|
||||
path: /up
|
||||
initial_delay_seconds: 2
|
||||
period_seconds: 10
|
||||
|
||||
vite:
|
||||
command: npm run dev
|
||||
working_dir: ./frontend/blog_portal
|
||||
readiness_probe:
|
||||
http_get:
|
||||
host: 127.0.0.1
|
||||
port: 5173
|
||||
path: /
|
||||
initial_delay_seconds: 2
|
||||
period_seconds: 2
|
||||
Loading…
Add table
Add a link
Reference in a new issue