-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (46 loc) · 1.26 KB
/
Makefile
File metadata and controls
67 lines (46 loc) · 1.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
.PHONY: up down build restart logs logs-worker test test-fast test-services migrate createsuperuser demo shell clean setup
# Docker
up:
docker compose up -d
down:
docker compose down
build:
docker compose up --build -d
restart:
docker compose restart api worker
logs:
docker compose logs -f api worker
logs-worker:
docker compose logs -f worker
# Django
migrate:
docker compose exec api python manage.py migrate
createsuperuser:
docker compose exec api python manage.py createsuperuser
shell:
docker compose exec api python manage.py shell
# Tests
test:
docker compose exec api pytest --cov=apps --cov-report=term-missing
test-fast:
docker compose exec api pytest -x -q
test-services:
docker compose exec api pytest tests/documents/test_services.py -v
# Demo
demo:
@echo ""
@echo "DocPulse API - Live Demo"
@echo ""
@docker compose exec api python scripts/demo.py
# Cleanup
clean:
docker compose down -v
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -name "*.pyc" -delete 2>/dev/null || true
# Setup from scratch
setup: build migrate
@echo ""
@echo "DocPulse ready at http://localhost:8000"
@echo "MinIO console: http://localhost:9001 (minioadmin / minioadmin)"
@echo "Flower: http://localhost:5555"
@echo ""