diff --git a/.gitignore b/.gitignore index 7c4bdc1fb..3f9485801 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ deno.lock .DS_Store .idea .dev +mprocs.log diff --git a/docsite/docs/ecosystem/development.md b/docsite/docs/ecosystem/development.md index e2902e612..84c4da2c5 100644 --- a/docsite/docs/ecosystem/development.md +++ b/docsite/docs/ecosystem/development.md @@ -79,38 +79,19 @@ Make sure your Rust toolchain is up to date and install the CLI tools: ```sh rustup update -cargo install typeshare-cli runnables-cli +cargo install typeshare-cli runnables-cli mprocs run link-client ``` ### Starting the services -Start a Mongo instance in Docker: +Run `run dev` to start the database, Core, Periphery, and UI all at once using [mprocs](https://github.com/pvolok/mprocs). Each process gets its own scrollable pane — use the arrow keys to switch between them and `Ctrl-Q` to quit. ```sh -docker run -d --name komodo-mongo \ --p 27017:27017 \ --v komodo-mongo-data:/data/db \ --v komodo-mongo-config:/data/configdb \ --e MONGO_INITDB_ROOT_USERNAME=komodo \ --e MONGO_INITDB_ROOT_PASSWORD=komodo \ -mongo +run dev ``` -In separate terminals, run Core, Periphery, and UI. - -```sh -run dev-core -``` - -```sh -run dev-periphery - -```sh -run dev-ui # Start in dev (watch) mode -``` - -Once everything is running, open `http://localhost:5173` and create a user account. +Once Core and the UI are running, open `http://localhost:5173` and create a user account. ### Rebuilding the frontend client diff --git a/mprocs.yaml b/mprocs.yaml new file mode 100644 index 000000000..1308d6fe8 --- /dev/null +++ b/mprocs.yaml @@ -0,0 +1,5 @@ +procs: + ui: "run dev-ui" + core: "run dev-core" + periphery: "run dev-periphery" + db: "docker run --rm -p 27017:27017 -v komodo-ferretdb:/state -e FERRETDB_HANDLER=sqlite ghcr.io/ferretdb/ferretdb:1" diff --git a/runfile.toml b/runfile.toml index f1b4ab9c7..aafda297a 100644 --- a/runfile.toml +++ b/runfile.toml @@ -1,5 +1,10 @@ # Runfile | https://crates.io/crates/runnables-cli +[dev] +alias = "d" +description = "starts all local dev services (db, core, periphery, ui) via mprocs" +cmd = "mprocs" + [dev-core] alias = "dc" description = "runs core --release pointing to .dev/core.config.toml"