chore(compose): build before restarting services
Co-Authored-By: GitHub Copilot <noreply@github.com>
This commit is contained in:
parent
71b3e44e8a
commit
4ae5d40bea
2
Justfile
2
Justfile
|
|
@ -2,7 +2,7 @@ default:
|
||||||
@just --list
|
@just --list
|
||||||
|
|
||||||
run:
|
run:
|
||||||
docker compose down --remove-orphans && docker compose up --build -d --remove-orphans
|
docker compose build && docker compose up -d --remove-orphans
|
||||||
|
|
||||||
stop:
|
stop:
|
||||||
docker compose down --remove-orphans
|
docker compose down --remove-orphans
|
||||||
|
|
|
||||||
|
|
@ -63,17 +63,18 @@ just
|
||||||
Useful recipes:
|
Useful recipes:
|
||||||
|
|
||||||
```sh
|
```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 stop # Stop Compose services; keep shard data volumes
|
||||||
just dev # Run locally with SQLite
|
just dev # Run locally with SQLite
|
||||||
```
|
```
|
||||||
|
|
||||||
### Run with Docker Compose and SQLite shards
|
### 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
|
```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`.
|
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`.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue