-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
93 lines (63 loc) · 2.26 KB
/
Copy pathMakefile
File metadata and controls
93 lines (63 loc) · 2.26 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
SHELL := /bin/bash
COMPOSE := docker compose
.PHONY: up down ps logs logs-django logs-ai logs-worker logs-worker-ai logs-worker-retention logs-webhooks logs-notifications logs-beat shell shell-worker shell-worker-ai shell-worker-retention shell-worker-webhooks shell-worker-notifications migrate makemigrations createsuperuser seed-local test test-all generate-sdk-models check-sdk-models lint ensure-env
ensure-env:
@test -f .env || cp .env.example .env
up: ensure-env
$(COMPOSE) up --build -d
down:
$(COMPOSE) down
ps:
$(COMPOSE) ps
logs:
$(COMPOSE) logs -f
logs-django:
$(COMPOSE) logs -f django
logs-ai:
$(COMPOSE) logs -f ai-service
logs-worker:
$(COMPOSE) logs -f celery-worker
logs-worker-ai:
$(COMPOSE) logs -f celery-worker-ai
logs-worker-retention:
$(COMPOSE) logs -f celery-worker-retention
logs-webhooks:
$(COMPOSE) logs -f celery-worker-webhooks
logs-notifications:
$(COMPOSE) logs -f celery-worker-notifications
logs-beat:
$(COMPOSE) logs -f celery-beat
shell:
$(COMPOSE) exec django /bin/bash
shell-worker:
$(COMPOSE) exec celery-worker /bin/bash
shell-worker-ai:
$(COMPOSE) exec celery-worker-ai /bin/bash
shell-worker-retention:
$(COMPOSE) exec celery-worker-retention /bin/bash
shell-worker-webhooks:
$(COMPOSE) exec celery-worker-webhooks /bin/bash
shell-worker-notifications:
$(COMPOSE) exec celery-worker-notifications /bin/bash
migrate:
$(COMPOSE) run --rm django python manage.py migrate
makemigrations:
$(COMPOSE) run --rm django python manage.py makemigrations
createsuperuser:
$(COMPOSE) run --rm django python manage.py createsuperuser
seed-local:
$(COMPOSE) run --rm -e DJANGO_SETTINGS_MODULE=config.settings.development django python manage.py seed_local
test:
$(COMPOSE) run --rm -e DJANGO_SETTINGS_MODULE=config.settings.testing django python manage.py test
$(COMPOSE) run --rm ai-service pytest
# Run every component's unit/integration test suite with locally installed toolchains.
test-all:
@./scripts/test_all.sh
generate-sdk-models:
uv run --project backend python scripts/generate_sdk_models.py
check-sdk-models:
uv run --project backend python scripts/generate_sdk_models.py --check
lint:
$(COMPOSE) run --rm django ruff check .
$(COMPOSE) run --rm django black --check .
$(COMPOSE) run --rm django mypy backend