-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
65 lines (45 loc) · 1.36 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
#
#
# Makefile for GloboNetworkAPI-WebUI
#
#
help:
@echo
@echo "Network API Web UI project"
@echo
@echo "Available target rules:"
@echo
@echo " build to build docker image locally"
@echo " start to containers locally using docker-compose"
@echo " stop to stop all project running containers"
@echo " restart to restart main container"
@echo " logs to follow logs of application container"
@echo " shell to enter a shell on running container"
@echo " docs to create documentation files"
@echo " clean to clean garbage left by builds and installation"
@echo " compile to compile .py files (just to check for syntax errors)"
@echo " test to execute all tests"
@echo
build: Dockerfile
@docker build . --no-cache
start: docker-compose.yml
@docker-compose up
stop: docker-compose.yml
@docker-compose down --remove-orphans
restart:
@docker restart netapi_webui_app
logs:
@docker logs --tail 100 --follow netapi_webui_app
shell:
@docker exec -it netapi_webui_app bash
clean:
@echo "Cleaning..."
@rm -rf build dist *.egg-info
@rm -rf docs/_build
@find . \( -name '*.pyc' -o -name '**/*.pyc' -o -name '*~' \) -delete
docs: clean
@(cd docs && make html)
compile: clean
@echo "Compiling source code..."
@python -tt -m compileall .
@pep8 --format=pylint --statistics networkapiclient setup.py