-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (31 loc) · 1.3 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
DOCKER_IMAGE_NAME ?= django-docker-dev
PROJECT_PORT ?= 8500
lint:
docker run -v ${CURDIR}:/apps registry.ubicast.net/docker/flake8:latest flake8 .
deadcode:
docker run -v ${CURDIR}:/apps registry.ubicast.net/docker/vulture:latest \
vulture --exclude *settings.py,*config.py,docker/,submodules/,logs/,data/ --min-confidence 90 --ignore-names user_modified,hints,fk_name,modeladmin .
test:
docker run --rm -e "PYTEST_ARGS=${PYTEST_ARGS}" -v ${CURDIR}:/opt/src ${DOCKER_IMAGE_NAME} make test_local
test_local:
pytest --reuse-db --cov=simple_order ${PYTEST_ARGS}
run:
docker run --rm -it -v ${CURDIR}:/opt/src -p ${PROJECT_PORT}:${PROJECT_PORT} ${DOCKER_IMAGE_NAME} make run_local
run_local:
bash docker/prepare.sh
python3 simple_order/manage.py runserver 0.0.0.0:${PROJECT_PORT}
shell:
docker run --rm -it -v ${CURDIR}:/opt/src ${DOCKER_IMAGE_NAME} make shell_local
shell_local:
bash docker/prepare.sh
bash
django_shell:
docker run --rm -it -v ${CURDIR}:/opt/src ${DOCKER_IMAGE_NAME} make shell_local_local
shell_local_local:
bash docker/prepare.sh
python3 simple_order/manage.py shell
django_makemigrations:
docker run --rm -it -v ${CURDIR}:/opt/src ${DOCKER_IMAGE_NAME} make django_makemigrations_local
django_makemigrations_local:
bash docker/prepare.sh
python3 simple_order/manage.py makemigrations