add nix development environment
Provide a direnv-loaded Laravel and future Vue toolchain with isolated worktree ports and a process-compose stack. Use PostgreSQL for local runtime services while retaining in-memory SQLite for PHPUnit.
This commit is contained in:
parent
2d25c28596
commit
83ca2cf43c
12 changed files with 345 additions and 13 deletions
59
process-compose.yaml
Normal file
59
process-compose.yaml
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
version: "0.5"
|
||||
|
||||
processes:
|
||||
postgres:
|
||||
command: postgres -D "$PGDATA" -k "$PGDATA" -c listen_addresses=''
|
||||
shutdown:
|
||||
signal: 2
|
||||
readiness_probe:
|
||||
exec:
|
||||
command: pg_isready -h "$PGDATA" -d "$PGDATABASE" -U "$PGUSER"
|
||||
initial_delay_seconds: 1
|
||||
period_seconds: 2
|
||||
|
||||
migrate:
|
||||
command: php artisan migrate --force
|
||||
working_dir: ./backend
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: process_healthy
|
||||
|
||||
mailpit:
|
||||
command: mailpit --smtp 127.0.0.1:${MAILPIT_SMTP_PORT:-2525} --listen 127.0.0.1:${MAILPIT_UI_PORT:-8025}
|
||||
readiness_probe:
|
||||
http_get:
|
||||
host: 127.0.0.1
|
||||
port: ${MAILPIT_UI_PORT:-8025}
|
||||
path: /
|
||||
initial_delay_seconds: 1
|
||||
period_seconds: 2
|
||||
|
||||
backend:
|
||||
command: php artisan serve --host=127.0.0.1 --port=${BACKEND_PORT:-8001}
|
||||
working_dir: ./backend
|
||||
depends_on:
|
||||
migrate:
|
||||
condition: process_completed_successfully
|
||||
mailpit:
|
||||
condition: process_healthy
|
||||
readiness_probe:
|
||||
http_get:
|
||||
host: 127.0.0.1
|
||||
port: ${BACKEND_PORT:-8001}
|
||||
path: /up
|
||||
initial_delay_seconds: 2
|
||||
period_seconds: 10
|
||||
|
||||
caddy:
|
||||
command: caddy run --config Caddyfile --adapter caddyfile
|
||||
depends_on:
|
||||
backend:
|
||||
condition: process_healthy
|
||||
readiness_probe:
|
||||
http_get:
|
||||
host: 127.0.0.1
|
||||
port: ${CADDY_PORT:-8000}
|
||||
path: /up
|
||||
scheme: https
|
||||
initial_delay_seconds: 1
|
||||
period_seconds: 2
|
||||
Loading…
Add table
Add a link
Reference in a new issue