-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (39 loc) · 1.37 KB
/
Makefile
File metadata and controls
52 lines (39 loc) · 1.37 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
.PHONY: help start stop restart status logs health setup format lint test test-cov clean
# Default target
help: ## Show this help message
@echo "Available commands:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'
# Service management
start: ## Start all services
docker compose up --build -d
stop: ## Stop all services
docker compose down
restart: ## Restart all services
docker compose restart
status: ## Show service status
docker compose ps
logs: ## Show service logs
docker compose logs -f
# Health checks
health: ## Check all services health
@echo "Checking service health..."
@curl -s http://localhost:8000/health | jq . || echo "API not responding"
@curl -s http://localhost:9200/_cluster/health | jq . || echo "OpenSearch not responding"
@curl -s http://localhost:8080/api/v2/monitor/health || echo "Airflow not responding"
@curl -s http://localhost:11434/api/version | jq . || echo "Ollama not responding"
# Development
setup: ## Install Python dependencies
uv sync
format: ## Format code
uv run ruff format
lint: ## Lint and type check
uv run ruff check --fix
uv run mypy src/
test: ## Run tests
uv run pytest
test-cov: ## Run tests with coverage
uv run pytest --cov=src --cov-report=html
# Cleanup
clean: ## Clean up everything
docker compose down -v
docker system prune -f