-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (34 loc) · 1.76 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
help: ## - Получить информацию о командах
@sed \
-e '/^[a-zA-Z0-9_\-]*:.*##/!d' \
-e 's/:.*##\s*/:/' \
-e 's/^\(.\+\):\(.*\)/$(shell tput setaf 6)\1$(shell tput sgr0):\2/' \
$(MAKEFILE_LIST) | column -c2 -t -s :
network: ## - Создать общую сеть для сервисов
docker network create custom_network
run: ## - Запустить docker-compose
docker-compose -f docker_compose/docker-compose.yaml up --build -d
stop: ## - Остановить и удалить docker-compose
docker-compose -f docker_compose/docker-compose.yaml down
collectstatic: ## - Забрать статику
docker-compose -f docker_compose/docker-compose.yaml exec movies_admin python manage.py collectstatic --no-input --clear
flush: ## - Очистить бд
docker-compose -f docker_compose/docker-compose.yaml exec movies_admin python manage.py flush --no-input
migrate: ## - Создать бд
docker-compose -f docker_compose/docker-compose.yaml exec movies_admin python manage.py migrate
load_data: ## - Заполнить бд
docker-compose -f docker_compose/docker-compose.yaml exec movies_admin python sqlite_to_postgres/load_data.py
docker-compose -f docker_compose/docker-compose.yaml exec movies_admin sh -c "python -m pytest -p no:cacheprovider tests/*"
superuser: ## - Создать superuser
docker-compose -f docker_compose/docker-compose.yaml exec movies_admin python manage.py createsuperuser --username=web [email protected]
movies_admin: ## - Выполнить полный запуск movies_admin
make network
make run
make collectstatic
make flush
make migrate
make load_data
clean: ## - Очистить docker
docker stop $$(docker ps -aq)
docker rm $$(docker ps -aq)
docker rmi $$(docker images -q)