-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
112 lines (91 loc) · 3.45 KB
/
Copy pathMakefile
File metadata and controls
112 lines (91 loc) · 3.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
.PHONY: help install dev test format lint clean run-example
help: ## Show this help message
@echo "Docky - Modern Docker and Kubernetes Management"
@echo ""
@echo "Available commands:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
install: ## Install dependencies with Poetry
@echo "Installing dependencies..."
poetry install
@echo "✓ Installation complete!"
@echo "Run 'poetry shell' to activate the virtual environment"
dev: ## Install development dependencies
@echo "Installing development dependencies..."
poetry install --with dev
@echo "✓ Development environment ready!"
test: ## Run tests
@echo "Running tests..."
poetry run pytest -v
format: ## Format code with black
@echo "Formatting code..."
poetry run black src/ tests/
@echo "✓ Code formatted!"
lint: ## Lint code with ruff
@echo "Linting code..."
poetry run ruff check src/ tests/
@echo "✓ Linting complete!"
type-check: ## Type check with mypy
@echo "Type checking..."
poetry run mypy src/
@echo "✓ Type checking complete!"
clean: ## Clean build artifacts and caches
@echo "Cleaning..."
rm -rf build/
rm -rf dist/
rm -rf *.egg-info
rm -rf .pytest_cache/
rm -rf .mypy_cache/
rm -rf .ruff_cache/
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
@echo "✓ Cleaned!"
run-example: ## Run example microservices stack
@echo "Starting microservices example..."
cd examples/microservices && docker-compose up -d
@echo "✓ Services started!"
@echo "Check status with: docker-compose -f examples/microservices/docker-compose.yml ps"
stop-example: ## Stop example stack
@echo "Stopping microservices example..."
cd examples/microservices && docker-compose down
@echo "✓ Services stopped!"
run-monitoring: ## Run monitoring stack
@echo "Starting monitoring stack..."
cd examples/monitoring && docker-compose up -d
@echo "✓ Monitoring stack started!"
@echo "Grafana: http://localhost:3000 (admin/admin123)"
@echo "Prometheus: http://localhost:9090"
health: ## Check system health
poetry run docky health
version: ## Show Docky version
poetry run docky version
# Docker cluster examples
example-cluster: ## Create example nginx cluster
@echo "Creating nginx cluster..."
poetry run docky cluster create example-nginx --image nginx:alpine --replicas 3
@echo "✓ Cluster created!"
@echo "View with: poetry run docky cluster list"
stop-cluster: ## Stop example cluster
poetry run docky cluster stop example-nginx
# Development helpers
shell: ## Open Poetry shell
poetry shell
build: ## Build package
poetry build
publish-test: ## Publish to Test PyPI
poetry publish --build -r testpypi
publish: ## Publish to PyPI
poetry publish --build
all: format lint type-check test ## Run all quality checks
# Quick setup
setup: install ## Quick setup for new users
@echo ""
@echo "╔═══════════════════════════════════════════╗"
@echo "║ Docky Setup Complete! ║"
@echo "╚═══════════════════════════════════════════╝"
@echo ""
@echo "Next steps:"
@echo " 1. Run 'make shell' to activate environment"
@echo " 2. Run 'docky health' to check system"
@echo " 3. Try 'make example-cluster' for a demo"
@echo ""
@echo "See QUICKSTART.md for more examples!"