diff --git a/Justfile b/Justfile index 44c2fa6..bd7eb28 100644 --- a/Justfile +++ b/Justfile @@ -2,7 +2,7 @@ default: @just --list run: - docker compose down --remove-orphans && docker compose up --build -d --remove-orphans + docker compose build && docker compose up -d --remove-orphans stop: docker compose down --remove-orphans diff --git a/README.md b/README.md index 97a658c..69dd88a 100644 --- a/README.md +++ b/README.md @@ -63,17 +63,18 @@ just Useful recipes: ```sh -just run # Stop Compose services, then build and start the gateway and SQLite shards +just run # Build images, then recreate the gateway and SQLite shards just stop # Stop Compose services; keep shard data volumes just dev # Run locally with SQLite ``` ### Run with Docker Compose and SQLite shards -Install Docker with the Compose plugin, then run `just run`. This stops any existing Compose stack, removes obsolete service containers, then starts one gateway container and three shard containers. Each shard stores its snapshot in its own SQLite database and persistent volume. You can also use the equivalent Docker command directly: +Install Docker with the Compose plugin, then run `just run`. It builds the images while the current stack is still running, then asks Compose to recreate changed services and remove obsolete service containers. This minimizes downtime by keeping the build outside the service interruption. The stack consists of one gateway container and three shard containers; each shard stores its snapshot in its own SQLite database and persistent volume. You can also use the equivalent Docker commands directly: ```sh -docker compose up --build -d --remove-orphans +docker compose build +docker compose up -d --remove-orphans ``` Open [http://localhost:7878](http://localhost:7878). The `shard_0_data`, `shard_1_data`, and `shard_2_data` volumes survive container restarts, `just stop`, and `docker compose down`.