#!/bin/sh set -eu cd "$(dirname "$0")/.." docker compose --env-file .env restart postgres docker compose --env-file .env restart api i=0 while [ $i -lt 60 ]; do if docker compose --env-file .env ps api | grep -q "healthy"; then exit 0 fi sleep 1 i=$((i + 1)) done echo "api did not become healthy in 60 seconds" >&2 exit 1