-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (26 loc) · 1.05 KB
/
Copy pathMakefile
File metadata and controls
38 lines (26 loc) · 1.05 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
.PHONY: help install up down logs migrate revision seed test lint fmt run
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-12s\033[0m %s\n", $$1, $$2}'
install: ## Install backend deps (incl. dev) into a uv venv
uv venv && uv pip install -e ".[dev]"
up: ## Start postgres + redis + gateway
docker compose up -d --build
down: ## Stop all services
docker compose down
logs: ## Tail gateway logs
docker compose logs -f gateway
migrate: ## Apply DB migrations
uv run alembic upgrade head
revision: ## Autogenerate a migration: make revision m="message"
uv run alembic revision --autogenerate -m "$(m)"
seed: ## Seed model registry + a demo API key
uv run python -m app.seed.seed
test: ## Run the test suite
uv run pytest -q
lint: ## Lint with ruff
uv run ruff check backend
fmt: ## Format with ruff
uv run ruff format backend && uv run ruff check --fix backend
run: ## Run the gateway locally (needs postgres+redis up)
uv run uvicorn app.main:app --reload --port 8000 --app-dir backend