
Just Use Makefile — The Build Tool You Already Have
Every project needs a make dev , make test , make deploy . Makefiles give you that with zero dependencies. Why Makefile Zero install — make is preinstalled on macOS and Linux Self-documenting — make help lists all available commands Language-agnostic — works with Python, Node, Go, Rust, anything Composable — chain commands with dependencies The Template .PHONY : help dev test lint build deploy clean help : ## Show this help @ grep -E '^[a-zA-Z_-]+:.*?## .*$$' $( MAKEFILE_LIST ) | sort | \ awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}' dev : ## Start development server python -m uvicorn app:main --reload --port 8000 test : ## Run tests python -m pytest tests/ -v --tb = short lint : ## Run linter ruff check . --fix ruff format . build : ## Build Docker image docker build -t myapp . deploy : build ## Deploy (builds first) docker push myapp:latest ssh prod "docker pull myapp:latest && docker compose up -d" clean : ## Remove build artifacts rm -rf __pycache__ .
Continue reading on Dev.to DevOps
Opens in a new tab




