forked from pomu0325/pierre-decheck
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
47 lines (32 loc) · 1.24 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
.PHONY: default create-env flake8 setup test build run up down shell-dev shell-app clean unittest
SHELL := /bin/bash
help: ## Displays help
@awk -F ':|##' \
'/^[^\t].+?:.*?##/ {\
printf "\033[36m%-30s\033[0m %s\n", $$1, $$NF \
}' $(MAKEFILE_LIST) | sort
default: build
create-env: ## Creates the virtual environment folder
mkdir -p env
virtualenv env
flake8: setup ## Linting/static checks
docker-compose run --rm dev bash -c "flake8 ."
setup: ## Installs the dependencies on the dev sidecar
docker-compose run --rm dev bash -c "pip install -r requirements.txt"
test: build unittest flake8 ## Runs all the tests
build: ## Build all the docker images
docker-compose build
run: ## Start a local instance of the service
docker-compose up
up: ## Start a local instance of the service run as a daemon
docker-compose up -d
down: ## Ensure the docker-compose pieces are all stopped
docker-compose down
shell-dev: ## Start a shell on the dev sidecar
docker-compose run --rm dev bash
shell-app: ## Start a shell on the app container
docker-compose run --rm app bash
clean: down ## Delete local data and ensure containers are stopped
rm -rf ./.compose-data
unittest: setup ## Run unit tests
docker-compose run --rm dev bash -c "./bin/test.sh"