Complete lab2 grade 4 implementation and report
Application checks / application (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
Daria0w0
2026-10-10 00:28:43 +03:00
parent 83e3810d33
commit c0ca56f208
24 changed files with 1107 additions and 137 deletions
+4 -4
View File
@@ -3,7 +3,7 @@ set -eu
cd "$(dirname "$0")/.."
snapshot() {
for service in api postgres; do
for service in api postgres redis; do
id=$(docker compose ps -q "$service")
test -n "$id"
docker inspect --format '{{.Name}} {{.Id}} {{.State.StartedAt}} {{.State.Status}} {{range .Mounts}}{{if eq .Type "volume"}}{{.Name}} {{end}}{{end}}' "$id"
@@ -11,8 +11,8 @@ snapshot() {
}
snapshot > evidence/restart-containers-before.txt
docker compose stop api postgres
docker compose up -d --wait postgres
docker compose stop api postgres redis
docker compose up -d --wait postgres redis
docker compose up -d --wait api
snapshot > evidence/restart-containers-after.txt
printf '%s\n' 'API and PostgreSQL restarted without removing volumes.'
printf '%s\n' 'API, PostgreSQL and Redis restarted without removing volumes.'