From fb8fe1655776791421284a6a093e86f0320c258a Mon Sep 17 00:00:00 2001 From: Damocles <106018783+Damocles078@users.noreply.github.com> Date: Thu, 2 Apr 2026 04:51:14 +0200 Subject: [PATCH] fix: mise start + missing docker image (#564) * fix: mise start + missing docker image Signed-off-by: Damocles078 * fix: bump livekit version Signed-off-by: Damocles <106018783+Damocles078@users.noreply.github.com> --------- Signed-off-by: Damocles078 Signed-off-by: Tom Signed-off-by: Damocles <106018783+Damocles078@users.noreply.github.com> Co-authored-by: Tom --- .mise/config.toml | 9 ++++++++ .mise/tasks/build | 2 +- .mise/tasks/docker/start | 8 +++++++ README.md | 46 ++++++++++++++++++++++------------------ 4 files changed, 43 insertions(+), 22 deletions(-) diff --git a/.mise/config.toml b/.mise/config.toml index 85fcd898..f5238e77 100644 --- a/.mise/config.toml +++ b/.mise/config.toml @@ -16,4 +16,13 @@ idiomatic_version_file_enable_tools = ["rust"] [tasks.start] description = "Run all services" depends = ["docker:start", "build"] +wait_for = ["docker:start", "build"] run = [{ task = "service:*" }] + +[env] +BUILDER = "cargo" +DOCKER_NETWORK_NAME = "stoatchat_default" +DATABASE_PORT = "27017" +RABBIT_PORT = "5672" +REDIS_PORT = "6379" +_.file = { path = ".env", tools = true } diff --git a/.mise/tasks/build b/.mise/tasks/build index c97c28d8..2e584eaf 100755 --- a/.mise/tasks/build +++ b/.mise/tasks/build @@ -2,4 +2,4 @@ #MISE description="Build project" set -e -cargo build "$@" +${BUILDER} build "$@" diff --git a/.mise/tasks/docker/start b/.mise/tasks/docker/start index cfcb0a9a..c045a4bd 100755 --- a/.mise/tasks/docker/start +++ b/.mise/tasks/docker/start @@ -3,3 +3,11 @@ set -e docker compose up -d + +docker run \ +--network=${DOCKER_NETWORK_NAME} \ +--name wait \ +--rm dokku/wait -c \ +rabbit:${RABBIT_PORT},\ +database:${DATABASE_PORT},\ +redis:${REDIS_PORT} diff --git a/README.md b/README.md index dd62769a..e090149e 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,14 @@ mise install mise build ``` +> [!TIP] +> You can override `BUILDER` in your `.env` file to run cargo with mold if you installed it: +> +> ```bash +> # .env +> BUILDER = "mold --run cargo" +> ``` + A default configuration `Revolt.toml` is present in this project that is suited for development. If you'd like to change anything, create a `Revolt.overrides.toml` file and specify relevant variables. @@ -112,7 +120,7 @@ If you'd like to change anything, create a `Revolt.overrides.toml` file and spec > - "14672:15672" > ``` > -> And corresponding Revolt configuration: +> With the corresponding Revolt configuration: > > ```toml > # Revolt.overrides.toml @@ -124,32 +132,25 @@ If you'd like to change anything, create a `Revolt.overrides.toml` file and spec > [rabbit] > port = 14072 > ``` +> +> And mise configuration +> +> ```bash +> #.env +> DATABASE_PORT = "14017" +> RABBIT_PORT = "14072" +> REDIS_PORT = "14079" +> ``` Then continue: ```bash -# start other necessary services -docker compose up -d +cp livekit.example.yml livekit.yml -# run the API server -cargo run --bin revolt-delta -# run the events server -cargo run --bin revolt-bonfire -# run the file server -cargo run --bin revolt-autumn -# run the proxy server -cargo run --bin revolt-january -# run the tenor proxy -cargo run --bin revolt-gifbox -# run the push daemon (not usually needed in regular development) -cargo run --bin revolt-pushd - -# hint: -# mold -run -# mold -run ./scripts/start.sh +mise start ``` -You can start a web client by doing the following: +You can start a web client by doing the following in another terminal: ```bash # if you do not have yarn yet and have a modern Node.js: @@ -163,6 +164,9 @@ cd stoat-web When signing up, go to http://localhost:14080 to find confirmation/password reset emails. +To stop all services, hit (CTRL + c) in the terminal you ran `mise start` and run `mise docker:stop` + + ## Deployment Guide ### Cutting new crate releases @@ -198,7 +202,7 @@ If you have bumped the crate versions, proceed to [GitHub releases](https://gith First, start the required services: ```sh -docker compose -f docker-compose.db.yml up -d +docker compose up -d ``` Now run tests for whichever database: