#!/bin/bash set -e # 设置环境变量 export SERVER_PORT="5000" export AUTH_JWT_SECRET="super-secret-jwt-token-with-at-least-32-characters-long" export AUTH_JWT_ALGORITHM="HS256" export DATABASE_URL="postgres://supabase_admin:postgres@127.0.0.1:5432/postgres" export DATABASE_POOL_URL="postgresql://postgres:postgres@127.0.0.1:6432/postgres" export DB_INSTALL_ROLES="true" export STORAGE_BACKEND="file" export FILE_STORAGE_BACKEND_PATH="/var/lib/storage" export DB_INSTALL_ROLES="false" # 等待 gotrue 服务可用(健康检查) until curl -s http://localhost:9999/ >/dev/null 2>&1; do echo "Waiting for gotrue..." sleep 1 done # 启动 Node 应用 exec node /supabase/storage-api/dist/start/server.js