-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (55 loc) · 1.69 KB
/
Makefile
File metadata and controls
63 lines (55 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
.PHONY: help up down logs status restart clean embed-test
# Default target
help:
@echo "Knowledge Vector Database Management"
@echo ""
@echo "Usage:"
@echo " make up - Start Qdrant and embedding server"
@echo " make down - Stop all services"
@echo " make logs - Tail service logs"
@echo " make status - Check service status"
@echo " make restart - Restart all services"
@echo " make clean - Stop services and remove volumes"
@echo " make embed-test - Test embedding server"
@echo ""
# Start services
up:
@echo "Starting Qdrant and embedding server..."
@docker compose up -d
@echo "Waiting for services to be healthy..."
@sleep 5
@docker compose ps
@echo ""
@echo "Services ready!"
@echo " Qdrant: http://localhost:6333"
@echo " Embeddings: http://localhost:8001"
@echo ""
@echo "Enable in .env:"
@echo " SEMANTIC_SEARCH_ENABLED=true"
# Stop services
down:
@docker compose down
# View logs
logs:
@docker compose logs -f
# Check status
status:
@docker compose ps
@echo ""
@echo "Health checks:"
@curl -sf http://localhost:6333/collections > /dev/null && echo " Qdrant: OK" || echo " Qdrant: NOT RUNNING"
@curl -sf http://localhost:8001/health > /dev/null && echo " Embeddings: OK" || echo " Embeddings: NOT RUNNING"
# Restart services
restart:
@docker compose restart
# Clean up (removes data volumes)
clean:
@echo "Stopping services and removing volumes..."
@docker compose down -v
@echo "Done. All data has been removed."
# Test embedding server
embed-test:
@echo "Testing embedding server..."
@curl -s -X POST http://localhost:8001/embed \
-H "Content-Type: application/json" \
-d '{"text": "Hello world"}' | jq '.dimension, .model'