Files
mtusi2026lab2/scripts/restart.sh
T
Ilya e914e384fc
Skeleton contracts / contracts (pull_request) Canceled after 0s
выполнение лр2 на 4
2026-10-07 18:28:12 +03:00

13 lines
475 B
Bash
Executable File

#!/bin/sh
# Restart the API and ALL state stores (PostgreSQL, Valkey), keeping volumes.
# Never `down -v`, never flush, never re-seed. Migrations run again (idempotent).
set -eu
cd "$(dirname "$0")/.."
docker compose stop api
docker compose stop valkey postgres
# depends_on brings postgres, valkey and migrate up first; --wait = api healthcheck (/health/ready).
docker compose up -d --no-build --wait api
docker compose ps --all --format 'table {{.Service}}\t{{.Status}}'