language-learning-app/Makefile

28 lines
631 B
Makefile

.PHONY: down build up logs shell lock migrate migration
build:
docker compose build
up:
docker compose up -d
down:
docker compose down
logs:
docker compose logs -f api
shell:
docker compose exec api bash
# Run pending migrations against the running db container
migrate:
docker compose exec api alembic upgrade head
# Generate a new migration: make migration NAME="add foo table"
migration:
docker compose exec api alembic revision --autogenerate -m "$(NAME)"
# Generate a pinned requirements.txt from pyproject.toml (requires uv installed locally)
lock:
cd api && uv pip compile pyproject.toml -o requirements.txt