#!/bin/bash # 🐳 Smart Parking Finder - Docker Development Environment echo "πŸš— Starting Smart Parking Finder Development Environment with Docker..." # Function to check if a command exists command_exists() { command -v "$1" >/dev/null 2>&1 } # Navigate to project root (go back one level since we're in scripts folder) cd "$(dirname "$0")/.." # Check required tools echo "Checking required tools..." if ! command_exists docker; then echo "❌ Docker is not installed. Please install Docker first." echo "πŸ“₯ Download from: https://www.docker.com/products/docker-desktop" exit 1 fi # Check if Docker is running if ! docker info >/dev/null 2>&1; then echo "❌ Docker is not running. Please start Docker and try again." exit 1 fi echo "βœ… All requirements met!" echo "" # Start services with docker-compose echo "🐳 Starting services with Docker Compose..." docker-compose up -d # Wait for services to be ready echo "⏳ Waiting for services to be ready..." sleep 10 echo "" echo "πŸŽ‰ Smart Parking Finder is now running!" echo "πŸ“‹ Service URLs:" echo " 🎨 Frontend: http://localhost:3000" echo " πŸ”§ Backend API: http://localhost:3001" echo " πŸ“Š API Docs: http://localhost:3001/api/docs" echo " πŸ—„οΈ Database: localhost:5432" echo " πŸ”΄ Redis: localhost:6379" echo " πŸ—ΊοΈ Valhalla: localhost:8002" echo "" echo "πŸ”§ Management commands:" echo " πŸ“‹ View logs: docker-compose logs -f" echo " πŸ›‘ Stop all: docker-compose down" echo " πŸ—‘οΈ Clean up: docker-compose down -v" echo ""