#!/bin/sh set -eu # Перезапускаем все сервисы, сохраняя volumes docker compose restart api postgres redis # Ждем, пока API снова станет готовым (healthcheck) echo "Waiting for API to be ready..." for i in {1..15}; do if curl -sf http://localhost:8080/health/ready > /dev/null; then echo "API is ready." exit 0 fi sleep 1 done echo "API failed to become ready after restart." exit 1