Starting and stopping the local app
Issue #787.
Run it
cd ~/projects/open-navigator
./start-all.sh
That is the whole procedure. It does the following, in order, and never asks a question:
- Checks the
.venvand thenode_modulesfolders (installs the Node ones if missing). - Stops this repo's leftover dev processes (
vite,npm run dev,npm start,main.py serve,uvicorn api.main,docusaurus) even when they hold no port. A Vite that hung during startup never binds 5173, so freeing ports alone would miss it. It only touches processes whose working directory is inside this repository, never other projects. - Frees ports 3000 (docs), 5173 (web app) and 8001 (API). It asks old processes to stop, forces them if they ignore that, and waits until each port is really free. If a port stays busy it stops with the PID.
- Starts the API, the web app and the docs site, in a
tmuxsession namedopen-navigator(or as background processes whentmuxis missing orSTART_ALL_NO_TMUX=1is set). - Waits up to 90 seconds for
http://localhost:8001/docsandhttp://localhost:5173/to answer, and printsOKorFAILEDfor each one, with the last lines of its log when it fails.
It exits 0 only when the API and the web app both answer. The docs site is reported but never fails the run.
Options
| Option | Effect |
|---|---|
--attach | Attach to the tmux session at the end (the old behavior). |
--no-docs | Do not start the documentation site (port 3000). |
Stop it
./stop-all.sh
When something fails
- Read the
FAILEDlines: they show the end oflogs/api.logorlogs/dashboard.log. - The web app uses
strictPort, so it fails if 5173 is taken instead of moving to 5174. Google sign-in redirects to 5173, so a hop would break login without an error. - Run it from the folder that has the
.venv. A second git worktree needs its own.venv(./install.sh), or run from the original folder.