|
| 1 | +.PHONY: help install test lint format clean build start stop restart logs |
| 2 | + |
| 3 | +# Help target |
| 4 | +help: |
| 5 | + @echo "Available commands:" |
| 6 | + @echo " make install Install all dependencies" |
| 7 | + @echo " make dev Start development environment" |
| 8 | + @echo " make build Build all services" |
| 9 | + @echo " make start Start all services" |
| 10 | + @echo " make stop Stop all services" |
| 11 | + @echo " make restart Restart all services" |
| 12 | + @echo " make logs Show logs" |
| 13 | + @echo " make test Run tests" |
| 14 | + @echo " make lint Run linters" |
| 15 | + @echo " make format Format code" |
| 16 | + @echo " make clean Clean up" |
| 17 | + |
| 18 | +# Install dependencies |
| 19 | +install: |
| 20 | + @echo "Installing dependencies..." |
| 21 | + cd api && npm install |
| 22 | + cd frontend && npm install |
| 23 | + cd email-bridge && pip install -r requirements.txt |
| 24 | + |
| 25 | +# Development |
| 26 | +up: |
| 27 | + docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d |
| 28 | + |
| 29 | +dev: up |
| 30 | + |
| 31 | +# Build |
| 32 | +build: |
| 33 | + docker-compose build |
| 34 | + |
| 35 | +# Start/Stop/Restart |
| 36 | +start: |
| 37 | + docker-compose up -d |
| 38 | + |
| 39 | +stop: |
| 40 | + docker-compose down |
| 41 | + |
| 42 | +restart: stop start |
| 43 | + |
| 44 | +# Logs |
| 45 | +logs: |
| 46 | + docker-compose logs -f |
| 47 | + |
| 48 | +# Testing |
| 49 | +test: |
| 50 | + cd api && npm test |
| 51 | + cd frontend && npm test |
| 52 | + |
| 53 | +# Linting |
| 54 | +lint: |
| 55 | + cd api && npm run lint |
| 56 | + cd frontend && npm run lint |
| 57 | + |
| 58 | +# Formatting |
| 59 | +format: |
| 60 | + cd api && npm run format |
| 61 | + cd frontend && npm run format |
| 62 | + |
| 63 | +# Cleanup |
| 64 | +clean: |
| 65 | + docker-compose down -v |
| 66 | + find . -name "node_modules" -type d -prune -exec rm -rf '{}' + |
| 67 | + find . -name "dist" -type d -prune -exec rm -rf '{}' + |
| 68 | + find . -name "build" -type d -prune -exec rm -rf '{}' + |
| 69 | + find . -name "coverage" -type d -prune -exec rm -rf '{}' + |
0 commit comments