-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (45 loc) Β· 1.54 KB
/
Copy pathMakefile
File metadata and controls
60 lines (45 loc) Β· 1.54 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
.DEFAULT_GOAL := up
compose := docker compose -f infra/compose.yml
gpu_compose := $(compose) -f infra/compose.gpu.yml
# Profile groups
CORE_PROFILES := --profile core --profile redis-local --profile app --profile worker
DEV_PROFILES := $(CORE_PROFILES) --profile frontend-dev
PROD_PROFILES := $(CORE_PROFILES) --profile frontend-prod
# Detect GPU mode
ifeq ($(USE_GPU),1)
compose_cmd := $(gpu_compose)
else
compose_cmd := $(compose)
endif
.PHONY: up down clean logs qdrant up-app up-worker up-full-dev up-full-prod \
rebuild build-all once-worker
# Core commands
up:
$(compose_cmd) $(DEV_PROFILES) up -d
down:
$(compose) --profile core --profile redis-local --profile app --profile worker --profile frontend-dev --profile frontend-prod down
clean:
$(compose) down -v
logs:
$(compose) logs -f
logs-%:
$(compose) logs -f $*
# Shorthands
qdrant: ; $(compose) --profile core up -d qdrant
up-app: ; $(compose) --profile core --profile app up -d
up-worker: ; $(compose) --profile core --profile worker up -d
# Full stacks
up-full-dev: ; $(compose_cmd) $(DEV_PROFILES) up -d
up-full-prod: ; $(compose_cmd) $(PROD_PROFILES) up -d
# Rebuilds
rebuild:
$(compose_cmd) $(DEV_PROFILES) build
$(compose_cmd) $(DEV_PROFILES) up -d
rebuild-%:
$(compose_cmd) $(DEV_PROFILES) build $*
$(compose_cmd) $(DEV_PROFILES) up -d $*
build-all:
$(compose) $(DEV_PROFILES) $(PROD_PROFILES) build
# Run worker once
once-worker:
$(compose) run --rm worker uv run -- python -c "from src.worker import run_worker_once; print('processed:', run_worker_once())"