-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (50 loc) · 2.11 KB
/
Makefile
File metadata and controls
64 lines (50 loc) · 2.11 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
# =============================================================================
# Shadow Gold - developer shortcuts
# =============================================================================
.PHONY: help env up down build pipeline dashboard logs psql clean nuke \
install run-local dashboard-local
help:
@echo "Shadow Gold - make targets"
@echo ""
@echo " Docker"
@echo " make env Copy .env.example to .env (once)"
@echo " make build docker compose build"
@echo " make up docker compose up --build -d"
@echo " make down Stop all services"
@echo " make pipeline Run the pipeline service once, streaming logs"
@echo " make dashboard Start just Postgres + dashboard"
@echo " make logs Tail logs"
@echo " make psql Open a psql shell against the DB"
@echo " make clean Stop and drop containers (keeps the volume)"
@echo " make nuke Stop + drop containers + delete pgdata volume"
@echo ""
@echo " Local (no Docker)"
@echo " make install pip install -r requirements.txt"
@echo " make run-local Run the pipeline against localhost Postgres"
@echo " make dashboard-local Run Streamlit against CSV fallback"
env:
@if [ ! -f .env ]; then cp .env.example .env && echo "Wrote .env"; else echo ".env already exists"; fi
build:
docker compose build
up: env
docker compose up --build -d
down:
docker compose down
pipeline: env
docker compose up --build --abort-on-container-exit pipeline
dashboard: env
docker compose up --build -d postgres dashboard
logs:
docker compose logs -f --tail=100
psql:
docker compose exec postgres psql -U $${POSTGRES_USER:-shadow_gold} -d $${POSTGRES_DB:-shadow_gold}
clean:
docker compose down --remove-orphans
nuke:
docker compose down --remove-orphans --volumes
install:
pip install -r requirements.txt
run-local:
bash -c 'for p in 1 2 3 4 5; do echo "=== Phase $$p ==="; done; echo "Run: docker/run_pipeline.sh is the source of truth - invoke individual scripts locally as needed."'
dashboard-local:
cd scripts/phase6/dashboard && streamlit run app.py