43 lines
940 B
Bash
43 lines
940 B
Bash
|
|
#!/bin/bash
|
||
|
|
|
||
|
|
# Development setup script
|
||
|
|
|
||
|
|
set -e
|
||
|
|
|
||
|
|
echo "🚀 Starting development environment..."
|
||
|
|
|
||
|
|
# Check if .env file exists
|
||
|
|
if [ ! -f .env ]; then
|
||
|
|
echo "⚠️ .env file not found. Copying from .env.example..."
|
||
|
|
cp .env.example .env
|
||
|
|
echo "✅ Created .env file. Please update it with your configuration."
|
||
|
|
fi
|
||
|
|
|
||
|
|
# Check if venv exists
|
||
|
|
if [ ! -d "backend/venv" ]; then
|
||
|
|
echo "📦 Creating Python virtual environment..."
|
||
|
|
cd backend
|
||
|
|
python -m venv venv
|
||
|
|
cd ..
|
||
|
|
fi
|
||
|
|
|
||
|
|
# Install backend dependencies
|
||
|
|
echo "📦 Installing backend dependencies..."
|
||
|
|
cd backend
|
||
|
|
source venv/bin/activate
|
||
|
|
pip install -r requirements/dev.txt
|
||
|
|
cd ..
|
||
|
|
|
||
|
|
# Install frontend dependencies
|
||
|
|
echo "📦 Installing frontend dependencies..."
|
||
|
|
cd frontend
|
||
|
|
npm install
|
||
|
|
cd ..
|
||
|
|
|
||
|
|
echo "✅ Development environment setup complete!"
|
||
|
|
echo ""
|
||
|
|
echo "To start the development servers:"
|
||
|
|
echo " make dev"
|
||
|
|
echo ""
|
||
|
|
echo "Or use Docker Compose:"
|
||
|
|
echo " docker-compose up -d"
|