-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
70 lines (47 loc) · 1.01 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
58
59
60
61
62
63
64
65
66
67
68
69
70
MANAGE := poetry run python manage.py
PORT ?= 8000
start:
poetry run gunicorn -w 5 -b 0.0.0.0:$(PORT) bot_backend.wsgi
test-django:lint
@$(MANAGE) test bot_backend.bot_db_models.tests.test_models.test_model --keepdb
check:
poetry run pytest -vv
tests-coverage:
poetry run pytest --cov=bot_backend --cov-report xml
up:
docker compose up
down:
docker compose down
build:
docker build . -t django_backend
run-server:
docker run -p 8000:8000 -d --name django_backend django_backend
collectstatic:
poetry run python manage.py collectstatic --noinput
dev:
@$(MANAGE) runserver
syncdb:
@$(MANAGE) migrate --run-syncdb
makemigrations:
@$(MANAGE) makemigrations
migrate:
@$(MANAGE) migrate
inspectdb:
@$(MANAGE) inspectdb
super-user:
@$(MANAGE) createsuperuser
lint:
poetry run flake8 bot_backend
black:
poetry run black .
pep-isort:
poetry run isort .
mypy:
poetry run mypy .
.PHONY: shell
shell:
@$(MANAGE) shell_plus --ipython
install:
poetry install
schema:
@$(MANAGE) sqldsn bot_db_models