-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
32 lines (22 loc) · 991 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
31
32
.PHONY: build
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
build: ## Build the Docker image
docker-compose -p capp build
up: build ## Bring the container up
docker-compose -p capp up -d
down: ## Stop the container
docker-compose -p capp stop
enter: ## Enter the running container
docker-compose -p capp exec backend /bin/bash
enter_frontend: ## Enter the running container
docker-compose -p capp exec frontend /bin/bash
clean: down ## Remove stoped containers
docker-compose -p capp rm
lint: ## Run linters on code
docker-compose -p capp exec backend bash -c "flake8 ."
docker-compose -p capp exec backend bash -c "black --diff --check --exclude 'migrations|node_modules' ."
lint_frontend: ## Run linters on code
docker-compose -p capp exec frontend bash -c "npm run --silent lint"
test: ## Run tests
docker-compose -p capp exec backend bash -c "pytest tests --cov=capp"