Commit 7b83c8f
chore(make): split dev into dev-api / dev-web, auto-migrate first
Two issues this fixes:
1. `make dev` worked off a fresh sqlite that never had migrations
applied; the server logged a wall of "no such table" errors
from the ingest and rollup schedulers on first tick.
2. Running `portless tempo make dev` injects a single PORT env into
the whole invocation, which both servers tried to bind. The fix
is two separate make targets so each can be wrapped by portless
individually:
portless tempo make dev-web # https://tempo.localhost
portless api.tempo make dev-api # https://api.tempo.localhost
Then VITE_API_TARGET=https://api.tempo.localhost lets the SPA's
/api proxy point at the API subdomain.
Changes:
- New `dev-api` target runs migrate-up then air. Honors PORT / TEMPO_LISTEN.
- New `dev-web` target runs `pnpm -C web dev`. Honors PORT and prints
the resolved VITE_API_TARGET so the user sees where /api routes.
- `dev` now `migrate-up`s before starting both, so fresh clones
Just Work.
- migrate-{up,down,status} use `mise exec --` so they work in
subprocess shells without mise activation (same portless concern).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 5d76c3a commit 7b83c8f
1 file changed
Lines changed: 16 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
30 | 41 | | |
31 | 42 | | |
32 | 43 | | |
| |||
66 | 77 | | |
67 | 78 | | |
68 | 79 | | |
69 | | - | |
| 80 | + | |
70 | 81 | | |
71 | 82 | | |
72 | | - | |
| 83 | + | |
73 | 84 | | |
74 | 85 | | |
75 | | - | |
| 86 | + | |
76 | 87 | | |
77 | 88 | | |
78 | 89 | | |
| |||
0 commit comments