chatai/supabase/kong/wrapper.sh

18 lines
359 B
Bash

#!/bin/bash
set -euo pipefail
# 捕获 SIGINT / SIGTERM / SIGQUIT 信号以优雅退出
cleanup() {
echo "[gotrue] Caught termination signal, shutting down..."
exit 0
}
trap SIGQUIT
until curl -s http://localhost:5000/rest/v1/ >/dev/null 2>&1; do
echo "Waiting for postgrest (via Kong)..."
sleep 1
done
exec kong start -c /supabase/kong/kong.conf