-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (36 loc) · 1.07 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
# use the rest as arguments for targets
TARGET_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
$(eval $(TARGET_ARGS):;@:)
# container
start:
docker-compose up -d
stop:
docker-compose stop
restart:
docker-compose stop $(TARGET_ARGS) && docker-compose start $(TARGET_ARGS)
rebuild:
docker-compose build --force-rm $(TARGET_ARGS)
clean-restart:
docker-compose stop $(TARGET_ARGS) && docker-compose rm -f $(TARGET_ARGS) && make rebuild $(TARGET_ARGS) && docker-compose up -d
bash:
docker-compose exec $(TARGET_ARGS) zsh
logs:
docker-compose logs -f $(TARGET_ARGS)
local:
pipenv sync
pep8:
autopep8 --in-place --recursive .
flake8:
pipenv run flake8
# app
freeze:
pipenv run pipenv_to_requirements -f
install:
pip install -r requirements-dev.txt
run:
@cd src; gunicorn -b 0.0.0.0:8000 meerkat.configurations.app.main:app -w 1 -k gevent --reload && echo "success!" || { echo "Crashed!"; exit 0; }
test:
pipenv run pytest --cov --cov-report html
watch:
eval watchexec -r -e 'py' -i './src/meerkat' "docker-compose up"