-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (24 loc) · 755 Bytes
/
Copy pathMakefile
File metadata and controls
33 lines (24 loc) · 755 Bytes
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
.PHONY: up down logs api-dev web-dev test test-api test-web
ifneq (,$(wildcard .env))
include .env
export
endif
up:
@test -f .env || (echo "Missing .env — run: cp .env.example .env" && exit 1)
docker compose up --build -d
down:
docker compose down
logs:
docker compose logs -f
api-dev:
@test -n "$(DATABASE_URL)" || (echo "Missing DATABASE_URL — copy .env.example to .env" && exit 1)
cd apps/api && CONTENT_DIR=$${CONTENT_DIR:-../../content/lessons} \
CORS_ORIGIN=$${CORS_ORIGIN:-http://localhost:5173} \
PYTHONPATH=. uv run uvicorn app.main:app --reload --host 0.0.0.0 --port 8080
web-dev:
cd apps/web && pnpm dev
test: test-api test-web
test-api:
cd apps/api && PYTHONPATH=. uv run pytest -q
test-web:
cd apps/web && pnpm test