-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (53 loc) · 1.68 KB
/
Makefile
File metadata and controls
66 lines (53 loc) · 1.68 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
64
65
66
# =============================================================================
# Aegis — Makefile
# =============================================================================
COMPOSE := docker compose
COMPOSE_PROD := docker compose -f docker-compose.yml -f docker-compose.prod.yml
.PHONY: dev prod down backup logs health migrate test lint format clean
# --- Development ---
dev:
$(COMPOSE) up -d
@echo "Services starting... run 'make health' to check status"
# --- Production ---
prod:
./infrastructure/scripts/deploy.sh --prod
# --- Stop all services ---
down:
$(COMPOSE) down
# --- Backup ---
backup:
./infrastructure/scripts/backup.sh
# --- Logs ---
logs:
$(COMPOSE) logs -f
# --- Health check ---
health:
@echo "=== Service Health ==="
@$(COMPOSE) ps
@echo ""
@echo "=== PostgreSQL ==="
@$(COMPOSE) exec postgres pg_isready -U aegis || echo "UNHEALTHY"
@echo ""
@echo "=== Redis ==="
@$(COMPOSE) exec redis redis-cli -a "$${REDIS_PASSWORD}" ping || echo "UNHEALTHY"
@echo ""
@echo "=== Qdrant ==="
@$(COMPOSE) exec qdrant wget -qO- http://localhost:6333/healthz || echo "UNHEALTHY"
# --- Database migrations ---
migrate:
cd backend && uv run alembic upgrade head
# --- Run tests ---
test:
cd backend && uv run pytest tests/ -v --cov=app --cov-report=term-missing --cov-fail-under=80
# --- Lint ---
lint:
cd backend && uv run ruff check .
@if [ -d console/node_modules ]; then cd console && npx biome check .; fi
# --- Format ---
format:
cd backend && uv run ruff format .
@if [ -d console/node_modules ]; then cd console && npx biome format --write .; fi
# --- Clean ---
clean:
$(COMPOSE) down -v
rm -rf backend/.venv console/.next console/node_modules mobile/node_modules