#!/usr/bin/env bash # 启动五个独立网站(monorepo sites/*,共享同一套数据库/Auth/Admin) # ai-stack:3001 launchai:3002 the-ai-ledger:3003 devai-tools:3004 findai:3005 set -e cd "$(dirname "$0")/../../.." SITES=(ai-stack:3001 launchai:3002 the-ai-ledger:3003 devai-tools:3004 findai:3005) for entry in "${SITES[@]}"; do site="${entry%%:*}" port="${entry##*:}" (cd "sites/$site" && bun run start > "/tmp/site-$site.log" 2>&1) & echo "$site → http://localhost:$port (pid $!)" done echo "等待启动..." sleep 5 for entry in "${SITES[@]}"; do site="${entry%%:*}" port="${entry##*:}" code=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:$port/" || echo "000") echo "$site [$port] → HTTP $code" done wait