base of lab 4

This commit is contained in:
2026-11-10 17:12:13 +03:00
parent 276dbdad8a
commit 1ec85a2402
78 changed files with 6133 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
mkdir -p .local-logs
exec > .local-logs/restart.log 2>&1
set -x
date -u
echo "Stopping API and load balancer"
docker compose stop -t 10 api lb
echo "Restarting persistent services"
docker compose restart -t 10 postgres redis minio
echo "Waiting for persistent services"
docker compose up -d \
--no-build \
--pull never \
--no-deps \
--no-recreate \
--wait \
--wait-timeout 25 \
postgres redis minio
echo "Starting API"
docker compose up -d \
--no-build \
--pull never \
--no-deps \
--no-recreate \
--wait \
--wait-timeout 45 \
api
echo "Starting load balancer without dependencies"
docker compose up -d \
--no-build \
--pull never \
--no-deps \
--no-recreate \
lb
echo "Restart completed"
date -u