music on atproto
plyr.fm
1# backend/justfile
2set shell := ["bash", "-eu", "-o", "pipefail", "-c"]
3default := "run"
4
5# run backend server (hot reloads)
6run:
7 uv run uvicorn backend.main:app --reload --host 0.0.0.0 --port ${PORT:-8001}
8
9# run tests with docker-compose
10test *ARGS='tests/':
11 docker compose -f tests/docker-compose.yml up -d
12 uv run pytest {{ ARGS }}
13 docker compose -f tests/docker-compose.yml down
14
15# run integration tests (requires running backend and PLYRFM_API_TOKEN in .env)
16integration:
17 set -a && source ../.env && set +a && uv run pytest tests/test_integration_upload.py -m integration -v -s
18
19# run type checking and linting
20lint:
21 uv run ty check
22 uv run ruff check .
23
24# create a new database migration
25migrate MESSAGE:
26 uv run alembic revision --autogenerate -m "{{ MESSAGE }}"
27
28# upgrade database to latest migration
29migrate-up:
30 uv run alembic upgrade head
31
32# show current migration status
33migrate-status:
34 uv run alembic current