Добавить мессенджер на Java с PostgreSQL и сессиями в Redis.
Application / application (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s

Данные и действующий токен переживают рестарт, сессии хранятся в Redis с AOF.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-14 20:52:39 +03:00
co-authored by Cursor
parent 65003b6119
commit 6300cfc6e0
26 changed files with 2659 additions and 17 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
docker compose --env-file .env restart postgres redis
i=0
while [ "$i" -lt 40 ]; do
pg_id=$(docker compose --env-file .env ps -q postgres)
rd_id=$(docker compose --env-file .env ps -q redis)
pg=$(docker inspect --format '{{if .State.Health}}{{.State.Health.Status}}{{end}}' "$pg_id")
rd=$(docker inspect --format '{{if .State.Health}}{{.State.Health.Status}}{{end}}' "$rd_id")
if [ "$pg" = "healthy" ] && [ "$rd" = "healthy" ]; then
docker compose --env-file .env restart api
exit 0
fi
i=$((i + 1))
sleep 1
done
echo 'postgres or redis did not become healthy' >&2
exit 1