-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
71 lines (57 loc) · 2.29 KB
/
Makefile
File metadata and controls
71 lines (57 loc) · 2.29 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
67
68
69
70
71
.PHONY: help up down dev dev-db dev-backend dev-frontend logs clean install build
help: ## Show this help
@echo "SidMonitor - Commands"
@echo ""
@echo "Docker (full stack):"
@echo " make up Start all services (postgres, clickhouse, backend, frontend)"
@echo " make down Stop all services"
@echo " make logs Show service logs"
@echo ""
@echo "Local development:"
@echo " make dev-db Start databases only (postgres + clickhouse)"
@echo " make dev-backend Start backend (port 8030)"
@echo " make dev-frontend Start frontend (port 3030)"
@echo " make dev Start databases + instructions"
@echo ""
@echo "Utilities:"
@echo " make install Install all dependencies"
@echo " make build Build frontend for production"
@echo " make clean Remove build artifacts"
# ---- Docker (full stack) ----
up: ## Start full stack with Docker
docker compose up -d --build
@echo ""
@echo "SidMonitor is running:"
@echo " Frontend: http://localhost:$${FRONTEND_PORT:-3000}"
@echo " Backend: http://localhost:$${BACKEND_PORT:-8000}"
@echo " API Docs: http://localhost:$${BACKEND_PORT:-8000}/docs"
down: ## Stop all Docker services
docker compose down
logs: ## Show Docker logs
docker compose logs -f
# ---- Local development ----
dev-db: ## Start databases only (for local dev)
docker compose -f docker-compose.dev.yml up -d
@echo "Waiting for services..."
@sleep 3
@echo "PostgreSQL: localhost:5432"
@echo "ClickHouse: localhost:8123"
dev-backend: ## Start backend locally
cd backend && python -m uvicorn app.main:app --host 0.0.0.0 --port 8030 --reload
dev-frontend: ## Start frontend locally
cd frontend && npm run dev
dev: dev-db ## Start databases + show instructions
@echo ""
@echo "Databases ready. Start in separate terminals:"
@echo " make dev-backend (port 8030)"
@echo " make dev-frontend (port 3030)"
# ---- Utilities ----
install: ## Install all dependencies
cd frontend && npm install
cd backend && pip install -r requirements.txt
build: ## Build frontend
cd frontend && npm run build
clean: ## Remove build artifacts
rm -rf frontend/node_modules frontend/dist
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true