67 lines
2.0 KiB
Makefile
67 lines
2.0 KiB
Makefile
.PHONY: help install dev prod test lint format clean docker-build docker-up docker-down docker-build-no-cache verify-css deploy-no-cache
|
|
|
|
help:
|
|
@echo "LLM Monitor - Makefile Commands"
|
|
@echo "================================"
|
|
@echo "make install - Installa le dipendenze"
|
|
@echo "make dev - Avvia in modalità sviluppo"
|
|
@echo "make prod - Avvia in modalità produzione"
|
|
@echo "make test - Esegui i test"
|
|
@echo "make lint - Linting e type checking"
|
|
@echo "make format - Formatta il codice"
|
|
@echo "make clean - Pulisce cache e file temporanei"
|
|
@echo "make docker-build - Build dell'immagine Docker"
|
|
@echo "make docker-build-no-cache - Build Docker senza cache (fix Tailwind)"
|
|
@echo "make docker-up - Avvia i container con Docker Compose"
|
|
@echo "make docker-down - Ferma i container con Docker Compose"
|
|
@echo "make verify-css - Verifica output.css compilato nel container"
|
|
@echo "make deploy-no-cache - Deploy completo con build no-cache + verifica CSS"
|
|
|
|
install:
|
|
python3 -m venv venv
|
|
. venv/bin/activate && pip install -r requirements.txt -r requirements-dev.txt
|
|
|
|
dev:
|
|
. venv/bin/activate && uvicorn main:app --reload --host 0.0.0.0 --port 8000
|
|
|
|
prod:
|
|
. venv/bin/activate && uvicorn main:app --host 0.0.0.0 --port 8000 --workers 4
|
|
|
|
test:
|
|
. venv/bin/activate && pytest tests/ -v --cov=app
|
|
|
|
lint:
|
|
. venv/bin/activate && flake8 app/ tests/ main.py && mypy app/
|
|
|
|
format:
|
|
. venv/bin/activate && black app/ tests/ main.py && isort app/ tests/ main.py
|
|
|
|
clean:
|
|
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
|
|
find . -type f -name "*.pyc" -delete
|
|
rm -rf .pytest_cache .mypy_cache .coverage htmlcov dist build *.egg-info
|
|
|
|
docker-build:
|
|
docker build -t llm-monitor:latest .
|
|
|
|
docker-build-no-cache:
|
|
docker compose build --no-cache
|
|
|
|
docker-up:
|
|
docker compose up -d
|
|
|
|
docker-down:
|
|
docker compose down
|
|
|
|
verify-css:
|
|
./scripts/verify-tailwind-css.sh
|
|
|
|
deploy-no-cache:
|
|
./scripts/deploy-no-cache.sh
|
|
|
|
docker-logs:
|
|
docker compose logs -f llm-monitor
|
|
|
|
docker-shell:
|
|
docker compose exec llm-monitor /bin/bash
|