FastAPI backend with a single-strategy async engine, paper and Binance brokers, pure-python indicators, a backtester that shares the engine's portfolio math, and a Vue dashboard with a live WebSocket feed. Adds the Gitea Actions CI/CD workflow that deploys to Traefik via docker_default.
46 lines
1.0 KiB
Makefile
46 lines
1.0 KiB
Makefile
PY := .venv/bin/python
|
|
BACKEND := backend
|
|
FRONTEND := frontend
|
|
|
|
.PHONY: install dev-backend dev-frontend test test-backend test-frontend lint fmt build up down deploy
|
|
|
|
install:
|
|
python3 -m venv .venv
|
|
$(PY) -m pip install -r $(BACKEND)/requirements-dev.txt
|
|
cd $(FRONTEND) && npm install
|
|
|
|
dev-backend:
|
|
cd $(BACKEND) && ../$(PY) -m uvicorn app.main:app --reload --port 8000
|
|
|
|
dev-frontend:
|
|
cd $(FRONTEND) && npm run dev
|
|
|
|
test: test-backend test-frontend
|
|
|
|
test-backend:
|
|
cd $(BACKEND) && ../$(PY) -m pytest
|
|
|
|
test-frontend:
|
|
cd $(FRONTEND) && npm test
|
|
|
|
lint:
|
|
cd $(BACKEND) && ../.venv/bin/ruff check .
|
|
cd $(BACKEND) && ../.venv/bin/ruff format --check .
|
|
|
|
fmt:
|
|
cd $(BACKEND) && ../.venv/bin/ruff format .
|
|
cd $(BACKEND) && ../.venv/bin/ruff check --fix .
|
|
|
|
build:
|
|
cd $(FRONTEND) && npm run build
|
|
|
|
up:
|
|
docker compose -f docker-compose.local.yml up --build
|
|
|
|
down:
|
|
docker compose -f docker-compose.local.yml down
|
|
|
|
# Production stack (requires the shared docker_default network + Traefik).
|
|
deploy:
|
|
docker compose up -d --build
|