chore(compose): build before restarting services

Co-Authored-By: GitHub Copilot <noreply@github.com>
This commit is contained in:
Steve Biedermann 2026-10-13 17:59:17 +02:00
parent 71b3e44e8a
commit 4ae5d40bea
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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`.