-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTaskfile.yml
More file actions
118 lines (91 loc) · 3.86 KB
/
Copy pathTaskfile.yml
File metadata and controls
118 lines (91 loc) · 3.86 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
version: "3"
vars:
PYTHON_SERVICES:
- services/ingestor
- services/pipeline
- services/api
- services/worker
- connectors/_base
- connectors/langfuse
- connectors/langsmith
- connectors/arize
- tools/cli
dotenv: [".env"]
tasks:
# ── Infrastructure ────────────────────────────────────────────────────────
up:
desc: Start infrastructure (Postgres, ClickHouse, Redis)
cmd: docker compose up -d postgres clickhouse redis
silent: false
down:
desc: Stop all infrastructure and services
cmd: docker compose down
up:all:
desc: Start full stack via Docker Compose (infra + API + worker + UI)
cmd: docker compose up -d
build:
desc: Build all Docker images
cmd: docker compose build
ps:
desc: Show running containers
cmd: docker compose ps
# ── Database ──────────────────────────────────────────────────────────────
migrate:
desc: Run Postgres migrations (reads DATABASE_URL from .env)
dir: infra/migrations/postgres
cmd: uv run --no-project alembic upgrade head
migrate:clickhouse:
desc: Apply ClickHouse DDL (idempotent — safe to re-run)
cmds:
- curl -s http://localhost:8123/ -d "$(cat infra/migrations/clickhouse/001_spans.sql)"
- curl -s http://localhost:8123/ -d "$(cat infra/migrations/clickhouse/003_project_spans.sql)"
- echo "ClickHouse tables applied"
# ── Development servers ───────────────────────────────────────────────────
api:
desc: Start the FastAPI server (port 8000) — requires task up + task migrate
dir: services/api
cmd: uv run uvicorn sentinel_api.main:app --host 0.0.0.0 --port 8000 --reload
worker:
desc: Start the Celery worker
dir: services/worker
cmd: uv run celery -A sentinel_worker.main worker --loglevel=info
ui:
desc: Start the Next.js UI (port 3001)
dir: services/ui
cmd: npm run dev
# ── Tests ─────────────────────────────────────────────────────────────────
test:
desc: Run unit tests (no Docker required)
dir: tests
cmd: uv run --no-project pytest unit/ -v
test:integration:
desc: Run integration tests (requires task up)
dir: tests
cmd: uv run --no-project pytest integration/ -v
test:all:
desc: Run all tests including integration
deps: [test, test:integration]
# ── Code quality ──────────────────────────────────────────────────────────
lint:
desc: Run ruff linter across all Python services
cmds:
- uv run ruff check services/ connectors/ tools/ tests/
- uv run ruff format --check services/ connectors/ tools/ tests/
fmt:
desc: Auto-format all Python code
cmd: uv run ruff format services/ connectors/ tools/ tests/
sync:
desc: Install dependencies across all Python services
cmds:
- for: { var: PYTHON_SERVICES }
cmd: cd {{.ITEM}} && uv sync
# ── Logs ──────────────────────────────────────────────────────────────────
logs:
desc: Tail logs from all running containers
cmd: docker compose logs -f
logs:worker:
desc: Tail worker logs
cmd: docker compose logs -f worker
logs:api:
desc: Tail API logs
cmd: docker compose logs -f api