-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathMakefile
114 lines (97 loc) · 3.87 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
PROJECT_ID := osmreporter
SHELL := /bin/bash
# ----------------------------------------------------------------------------
# P R O D U C T I O N C O M M A N D S
# ----------------------------------------------------------------------------
run:
@echo
@echo "------------------------------------------------------------------"
@echo "Running in production mode"
@echo "------------------------------------------------------------------"
@docker-compose -p $(PROJECT_ID) up -d web
log:
@echo
@echo "------------------------------------------------------------------"
@echo "Showing flask logs in production mode"
@echo "------------------------------------------------------------------"
@docker-compose -p $(PROJECT_ID) logs -t web
build:
@echo
@echo "------------------------------------------------------------------"
@echo "Building in production mode"
@echo "------------------------------------------------------------------"
@docker-compose -p $(PROJECT_ID) build web
kill:
@echo
@echo "------------------------------------------------------------------"
@echo "Killing in production mode"
@echo "------------------------------------------------------------------"
@docker-compose -p $(PROJECT_ID) kill web
rm: kill
@echo
@echo "------------------------------------------------------------------"
@echo "Removing in production mode"
@echo "------------------------------------------------------------------"
@docker-compose -p $(PROJECT_ID) rm web
# ----------------------------------------------------------------------------
# D E V E L O P M E N T C O M M A N D S
# ----------------------------------------------------------------------------
# Run pep8 style checking
#http://pypi.python.org/pypi/pep8
pep8:
@echo
@echo "-----------"
@echo "PEP8 issues"
@echo "-----------"
@pep8 --version
@pep8 --repeat --ignore=E203,E121,E122,E123,E124,E125,E126,E127,E128,E402 --exclude venv,pydev,fabfile.py . || true
pylint:
@echo
@echo "-----------------"
@echo "Pylint violations"
@echo "-----------------"
@pylint --version
@pylint --reports=n --rcfile=pylintrc reporter || true
build-test:
@echo
@echo "------------------------------------------------------------------"
@echo "Building in test mode"
@echo "------------------------------------------------------------------"
@docker-compose -p $(PROJECT_ID) build test
run-test:
@echo
@echo "------------------------------------------------------------------"
@echo "Running in test mode"
@echo "------------------------------------------------------------------"
@docker-compose -p $(PROJECT_ID) run test
build-dev:
@echo
@echo "------------------------------------------------------------------"
@echo "Building in development mode"
@echo "------------------------------------------------------------------"
@docker-compose -p $(PROJECT_ID) build dev
log-dev:
@echo
@echo "------------------------------------------------------------------"
@echo "Showing flask logs in development mode"
@echo "------------------------------------------------------------------"
@docker-compose -p $(PROJECT_ID) logs -t dev
kill-dev:
@echo
@echo "------------------------------------------------------------------"
@echo "Killing in development mode"
@echo "------------------------------------------------------------------"
@docker-compose -p $(PROJECT_ID) kill dev
rm-dev: kill-dev
@echo
@echo "------------------------------------------------------------------"
@echo "Removing in development mode"
@echo "------------------------------------------------------------------"
@docker-compose -p $(PROJECT_ID) rm dev
run-dev:
@echo
@echo "------------------------------------------------------------------"
@echo "Running in development mode"
@echo "You can access it on http://localhost:64002"
@echo "------------------------------------------------------------------"
@docker-compose -p $(PROJECT_ID) up -d dev