-
-
Notifications
You must be signed in to change notification settings - Fork 231
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (40 loc) · 1.67 KB
/
Makefile
File metadata and controls
53 lines (40 loc) · 1.67 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
.DEFAULT_GOAL := help
.PHONY: help logs test docker-test stop build up up-view install setup run admin view
help:
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-25s\033[0m %s\n", $$1, $$2}'
install: ## install all Python dependencies (local dev)
pip install uv 2>/dev/null || true
uv pip install -r requirements/local.txt
setup: install ## install deps + Playwright browsers + migrate + bootstrap CRM
playwright install --with-deps chromium
python manage.py migrate --no-input
python manage.py setup_crm
run: ## run the daemon
python manage.py rundaemon
test: ## run the test suite
.venv/bin/pytest
admin: ## start the Django Admin web server
@echo ""
@echo " Django Admin: http://localhost:8000/admin/"
@echo " No superuser yet? Run: python manage.py createsuperuser"
@echo ""
python manage.py runserver
# Docker targets
logs: ## follow the logs of the service
docker compose -f local.yml logs -f
docker-test: ## run tests in Docker
docker compose -f local.yml run --remove-orphans app py.test -vv -p no:cacheprovider
stop: ## stop all services defined in Docker Compose
docker compose -f local.yml stop
build: ## build all services defined in Docker Compose
docker compose -f local.yml build
up: ## run the defined service in Docker Compose
docker compose -f local.yml up --build -d
docker compose -f local.yml logs -f
up-view: ## run the defined service in Docker Compose and open vinagre
docker compose -f local.yml up --build -d
sleep 3
$(MAKE) view
docker compose -f local.yml logs -f app
view: ## open vinagre to view the app
@sh -c 'vinagre vnc://127.0.0.1:5900 > /dev/null 2>&1 &'