-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
116 lines (91 loc) · 4.3 KB
/
Makefile
File metadata and controls
116 lines (91 loc) · 4.3 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
113
114
115
116
.PHONY: help infra up down ps logs clean
# Default profiles for recipes
PROFILES ?=
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
# ─── Infrastructure ───────────────────────────────────────
infra: ## Start shared infra (PostgreSQL, Redis, MinIO)
docker compose up -d postgres redis minio
# ─── Recipes (common combos) ─────────────────────────────
basic-analytics: ## Dagster + dbt + Metabase
docker compose --profile dagster --profile dbt --profile metabase up -d
streaming-pipeline: ## Kafka + ClickHouse + Superset
docker compose --profile kafka --profile clickhouse --profile superset up -d
lakehouse: ## Meltano + dbt + Iceberg + Trino + Superset
docker compose --profile meltano --profile dbt --profile iceberg --profile trino --profile superset up -d
full-stack: ## Start everything
docker compose --profile "*" up -d
notebook: ## Start Jupyter + infra
docker compose --profile jupyter up -d
# ─── Selective stack management ──────────────────────────
up: ## Start specific profiles: make up PROFILES="dagster dbt"
$(if $(PROFILES), \
docker compose $(foreach p,$(PROFILES),--profile $(p)) up -d, \
docker compose up -d)
down: ## Stop all services
docker compose --profile "*" down
stop: ## Stop specific profiles: make stop PROFILES="dagster"
$(if $(PROFILES), \
docker compose $(foreach p,$(PROFILES),--profile $(p)) down, \
docker compose down)
# ─── Status & Debugging ─────────────────────────────────
ps: ## Show running containers
docker compose --profile "*" ps
logs: ## Tail logs: make logs SVC=dagster-webserver
docker compose --profile "*" logs -f $(SVC)
health: ## Show health status of all containers
@docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" | grep ds-
ports: ## Show all exposed ports
@echo "═══════════════════════════════════════════════"
@echo " Data Stack Lab - Port Map"
@echo "═══════════════════════════════════════════════"
@echo " Infrastructure:"
@echo " PostgreSQL :5432"
@echo " Redis :6379"
@echo " MinIO API :9000"
@echo " MinIO Console :9001"
@echo ""
@echo " Orchestration:"
@echo " Airflow :8080"
@echo " Dagster :3000"
@echo ""
@echo " Warehouse:"
@echo " ClickHouse (HTTP) :8123"
@echo " ClickHouse (TCP) :9009"
@echo " Trino :8090"
@echo ""
@echo " Visualization:"
@echo " Metabase :3030"
@echo " Superset :8088"
@echo ""
@echo " Ingestion:"
@echo " Meltano :5050"
@echo ""
@echo " Streaming:"
@echo " Kafka :9092"
@echo " Kafka UI :8081"
@echo " Redpanda :19092"
@echo " Redpanda Console :8082"
@echo ""
@echo " Catalog:"
@echo " OpenMetadata :8585"
@echo ""
@echo " Storage:"
@echo " Iceberg REST :8181"
@echo ""
@echo " Notebook:"
@echo " Jupyter :8888 (token: datastack)"
@echo "═══════════════════════════════════════════════"
# ─── Maintenance ─────────────────────────────────────────
clean: ## Remove all containers, volumes, and networks
docker compose --profile "*" down -v --remove-orphans
reset-db: ## Reset PostgreSQL (deletes all data)
docker compose down postgres
docker volume rm $$(docker volume ls -q | grep postgres_data) 2>/dev/null || true
docker compose up -d postgres
shell: ## Open shell in a container: make shell SVC=postgres
docker compose exec $(SVC) sh
psql: ## Connect to PostgreSQL
docker compose exec postgres psql -U admin
psql-db: ## Connect to specific DB: make psql-db DB=airflow
docker compose exec postgres psql -U admin -d $(DB)