-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
executable file
·30 lines (23 loc) · 1009 Bytes
/
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
#!/usr/bin/make -f
PROJECT_NAME := 'Microservices'
.DEFAULT_GOAL := help
.PHONY: test build migrate
.PHONY: flake8 clean
test: ## Run test suite in project's main container
docker-compose exec places python manage.py test
docker-compose exec peoples python manage.py test
build: ## Build project image
docker-compose build
migrate: ## Execute all migrations in project's main container
docker-compose exec places python manage.py recreate_db
docker-compose exec peoples python manage.py recreate_db
docker-compose exec places python manage.py populate_db
docker-compose exec peoples python manage.py populate_db
flake8: ## Run flake8
docker-compose run --rm places flake8
docker-compose run --rm peoples flake8
clean: ## Remove all .pyc
find . -name "*.pyc" -exec rm -f {} \;
find . -name '__pycache__' -exec rm -fr {} +
help: ## Display this help text
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'