-
Notifications
You must be signed in to change notification settings - Fork 489
/
Makefile
57 lines (41 loc) · 1.42 KB
/
Makefile
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
SHELL := /bin/bash # Use bash syntax
ARG := $(word 2, $(MAKECMDGOALS) )
clean:
@find . -name "*.pyc" -exec rm -rf {} \;
@find . -name "__pycache__" -delete
test:
poetry run backend/manage.py test backend/ $(ARG) --parallel --keepdb
test_reset:
poetry run backend/manage.py test backend/ $(ARG) --parallel
backend_format:
black backend
# Commands for Docker version
docker_setup:
docker volume create {{project_name}}_dbdata
docker compose build --no-cache backend
docker compose run --rm backend python manage.py spectacular --color --file schema.yml
docker compose run frontend npm install
docker compose run --rm frontend npm run openapi-ts
docker_test:
docker compose run backend python manage.py test $(ARG) --parallel --keepdb
docker_test_reset:
docker compose run backend python manage.py test $(ARG) --parallel
docker_up:
docker compose up -d
docker_update_dependencies:
docker compose down
docker compose up -d --build
docker_down:
docker compose down
docker_logs:
docker compose logs -f $(ARG)
docker_makemigrations:
docker compose run --rm backend python manage.py makemigrations
docker_migrate:
docker compose run --rm backend python manage.py migrate
docker_backend_shell:
docker compose run --rm backend bash
docker_backend_update_schema:
docker compose run --rm backend python manage.py spectacular --color --file schema.yml
docker_frontend_update_api:
docker compose run --rm frontend npm run openapi-ts