-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (27 loc) · 1.39 KB
/
Copy pathMakefile
File metadata and controls
34 lines (27 loc) · 1.39 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
.PHONY: install dev test lint deploy health
# ── Setup ──────────────────────────────────────────
install:
pip install -r requirements.txt
dev:
uvicorn main:app --reload --port 8000
# ── Quality ────────────────────────────────────────
lint:
pip install ruff --quiet && ruff check services/
test:
pip install pytest httpx --quiet && pytest tests/ -v
# ── Health check ───────────────────────────────────
health:
@echo "Pinging /health ..."
curl -sf $${BASE_URL:-http://localhost:8000}/health | python3 -m json.tool
# ── Railway deploy (CI triggers this via push) ─────
deploy:
@echo "Push to main triggers Railway auto-deploy."
@echo "Ensure RAILWAY_TOKEN is set in GitHub Secrets."
# ── Env validation ─────────────────────────────────
check-env:
@python3 -c "\
import os, sys; \
required = ['SUPABASE_URL','SUPABASE_SERVICE_KEY','STRIPE_SECRET_KEY',\
'STRIPE_WEBHOOK_SECRET','NOTION_TOKEN','NOTION_DATABASE_ID']; \
missing = [k for k in required if not os.getenv(k)]; \
(print('Missing vars:', missing) or sys.exit(1)) if missing else print('All env vars present.')"