You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
2.0 KiB
Makefile
79 lines
2.0 KiB
Makefile
# Know Foolery - Development Makefile
|
|
|
|
.PHONY: help build up down logs clean install test lint format init-db
|
|
|
|
help: ## Show this help message
|
|
@echo 'Usage: make [target]'
|
|
@echo ''
|
|
@echo 'Targets:'
|
|
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
|
|
|
|
build: ## Build all Docker containers
|
|
docker compose build
|
|
|
|
up: ## Start all services
|
|
docker compose up -d
|
|
|
|
up-dev: ## Start all services in development mode (with logs)
|
|
docker compose up --build
|
|
|
|
down: ## Stop all services
|
|
docker compose down
|
|
|
|
logs: ## Show logs for all services
|
|
docker compose logs -f
|
|
|
|
clean: ## Clean up containers, images, and volumes
|
|
docker compose down -v --remove-orphans
|
|
docker system prune -f
|
|
|
|
install-frontend: ## Install frontend dependencies
|
|
cd frontend && npm install
|
|
|
|
install-backend: ## Install backend dependencies
|
|
cd backend && pip install -r requirements.txt
|
|
|
|
install: install-frontend install-backend ## Install all dependencies
|
|
|
|
test-frontend: ## Run frontend tests
|
|
cd frontend && npm test
|
|
|
|
test-backend: ## Run backend tests
|
|
cd backend && pytest
|
|
|
|
test: test-backend ## Run all tests
|
|
|
|
lint-frontend: ## Lint frontend code
|
|
cd frontend && npm run lint
|
|
|
|
lint-backend: ## Lint backend code
|
|
cd backend && flake8 .
|
|
|
|
lint: lint-frontend lint-backend ## Lint all code
|
|
|
|
format-backend: ## Format backend code
|
|
cd backend && black . && isort .
|
|
|
|
format: format-backend ## Format all code
|
|
|
|
init-db: ## Initialize database with schema and sample data
|
|
docker compose exec game-service python /app/shared/database/init_db.py
|
|
|
|
dev-frontend: ## Start frontend in development mode
|
|
cd frontend && npm run dev
|
|
|
|
dev-backend: ## Start backend services in development mode
|
|
cd backend/services/api-gateway && uvicorn app.main:app --reload --port 8000
|
|
|
|
setup: ## Initial project setup
|
|
cp .env.example .env
|
|
make install
|
|
make build
|
|
make up
|
|
make init-db
|
|
@echo "Setup complete! Visit http://localhost:3000"
|
|
|
|
status: ## Show status of all services
|
|
docker compose ps
|
|
|
|
restart: down up ## Restart all services
|