42 lines
1006 B
Bash
Executable File
42 lines
1006 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
echo "🚀 Starting all services..."
|
|
|
|
# Check if Docker is running
|
|
if ! docker info &> /dev/null; then
|
|
echo "❌ Docker is not running. Please start Docker first."
|
|
exit 1
|
|
fi
|
|
|
|
# Check if Neon DATABASE_URL is set
|
|
if [ -f "deployments/local/.env.local" ]; then
|
|
export $(grep -v '^#' deployments/local/.env.local | xargs)
|
|
fi
|
|
|
|
if [ -z "$DATABASE_URL" ]; then
|
|
echo "⚠️ WARNING: DATABASE_URL not set!"
|
|
echo " Please setup Neon database: ./scripts/db/setup-neon.sh"
|
|
echo " Or set DATABASE_URL in deployments/local/.env.local"
|
|
echo ""
|
|
read -p "Continue anyway? (y/n): " continue
|
|
if [ "$continue" != "y" ]; then
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
# Start infrastructure (Redis, Traefik - no PostgreSQL needed)
|
|
echo "📦 Starting infrastructure (Redis, Traefik)..."
|
|
cd deployments/local
|
|
docker-compose up -d
|
|
cd ../..
|
|
|
|
# Wait for Redis to be ready
|
|
echo "⏳ Waiting for Redis to be ready..."
|
|
sleep 3
|
|
|
|
# Start services
|
|
echo "🚀 Starting services..."
|
|
pnpm dev
|