#!/bin/bash # Quick Qdrant Docker Start Script echo "๐Ÿš€ Starting Qdrant with Docker..." echo "" # Check if container exists if docker ps -a | grep -q qdrant; then echo "๐Ÿ“ฆ Qdrant container found" if docker ps | grep -q qdrant; then echo "โœ… Qdrant is already running!" else echo "๐Ÿ”„ Starting existing container..." docker start qdrant sleep 2 echo "โœ… Qdrant started!" fi else echo "๐Ÿ“ฆ Creating new Qdrant container..." docker run -d \ --name qdrant \ -p 6333:6333 \ -p 6334:6334 \ -v "$(pwd)/qdrant_storage:/qdrant/storage" \ qdrant/qdrant echo "โณ Waiting for Qdrant to start..." sleep 3 echo "โœ… Qdrant container created and started!" fi echo "" echo "๐Ÿ“ Qdrant Dashboard: http://localhost:6333/dashboard" echo "๐Ÿ“ Qdrant API: http://localhost:6333" echo "" echo "๐Ÿงช Testing connection..." python3 -c " try: from qdrant_client import QdrantClient client = QdrantClient(host='localhost', port=6333, timeout=5) collections = client.get_collections().collections print(f'โœ… Connection successful!') print(f'๐Ÿ“ฆ Collections: {len(collections)}') for coll in collections: coll_info = client.get_collection(coll.name) print(f' - {coll.name}: {coll_info.points_count} points') except Exception as e: print(f'โŒ Connection failed: {e}') print(' Make sure Docker is running and Qdrant container started') " echo "" echo "โœ… Done!"