[+] add project

This commit is contained in:
2026-11-15 22:00:21 +03:00
parent 0ab3a341aa
commit 369c5c1660
45 changed files with 2442 additions and 57 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/bin/sh
set -eu
ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
cd "$ROOT"
docker compose restart postgres redis >/dev/null
deadline=$(( $(date +%s) + 60 ))
for service in postgres redis; do
container=$(docker compose ps -q "$service")
while :; do
status=$(docker inspect --format '{{if .State.Health}}{{.State.Health.Status}}{{else}}none{{end}}' "$container")
if [ "$status" = healthy ]; then
break
fi
if [ "$status" = unhealthy ] || [ "$(date +%s)" -ge "$deadline" ]; then
printf '%s\n' "$service did not become healthy after restart" >&2
exit 1
fi
sleep 1
done
done
"$ROOT/scripts/rolling-restart.sh"