#!/bin/bash

echo "╔════════════════════════════════════════════════════════════════════════════╗"
echo "║              🚀 启动开发环境（MySQL + Redis + 本地服务）                     ║"
echo "╚════════════════════════════════════════════════════════════════════════════╝"
echo ""

# 步骤1: 启动MySQL和Redis
echo "📦 步骤1: 启动MySQL和Redis容器..."
docker-compose -f docker-compose.dev.yml up -d

# 等待服务就绪
echo "⏳ 等待MySQL和Redis就绪..."
sleep 10

# 检查服务状态
echo ""
echo "📊 服务状态:"
docker-compose -f docker-compose.dev.yml ps

echo ""
echo "✅ MySQL和Redis已启动！"
echo ""
echo "🔗 连接信息:"
echo "   MySQL: localhost:3306"
echo "   Redis: localhost:6379"
echo ""
echo "📋 下一步:"
echo "   1. 启动NestJS: cd wwjcloud-nest && npm run start:dev"
echo "   2. 启动Admin:  cd wwjcloud-nest/admin && npm run dev"
echo ""
