add tmux workflow for local dev
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
# Papercrate
|
||||
|
||||
## Local Development
|
||||
|
||||
Use the provided `papercrate.tmux` to spin up the full stack in one tmux session:
|
||||
|
||||
```bash
|
||||
tmux -f papercrate.tmux attach
|
||||
```
|
||||
|
||||
This creates windows for the compose stack, frontend dev server, backend API, and background worker using the repository-relative paths defined in the tmux file. Detach with `Ctrl+b d` and reattach later with the same command.
|
||||
|
||||
## Backend Integration Tests
|
||||
|
||||
Integration tests require a running Postgres instance (and, optionally, Quickwit for OCR indexing). The repository includes a lightweight compose file for local runs:
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# tmux session for Papercrate dev stack
|
||||
new-session -d -s papercrate -n docker -c . 'docker compose up'
|
||||
|
||||
new-window -t papercrate:1 -n frontend -c ./frontend 'npm run dev'
|
||||
|
||||
new-window -t papercrate:2 -n backend -c ./backend 'cargo run --bin backend'
|
||||
|
||||
new-window -t papercrate:3 -n worker -c ./backend 'cargo run --bin worker'
|
||||
|
||||
select-window -t papercrate:0
|
||||
attach-session -t papercrate
|
||||
Reference in New Issue
Block a user