-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
37 lines (29 loc) · 920 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
33
34
35
36
37
.PHONY: env clean api ui worker
help:
@echo " env create a development environment using pipenv"
@echo " deps install dependencies using pip"
@echo " clean remove unwanted files like .pyc's"
@echo " lint check style with flake8"
@echo " api start api server"
@echo " ui start ui server"
@echo " worker start async tasks worker"
env:
sudo easy_install pip && \
pip install pipenv -i https://pypi.douban.com/simple && \
npm install yarn && \
make deps
deps:
pipenv install --dev && \
pipenv run flask db-setup && \
pipenv run flask init-cache && \
cd cmdb-ui && yarn install && cd ..
api:
cd cmdb-api && pipenv run flask run -h 0.0.0.0
worker:
cd cmdb-api && pipenv run celery worker -A celery_worker.celery -E -Q cmdb_async --concurrency=1
ui:
cd cmdb-ui && yarn run serve
clean:
pipenv run flask clean
lint:
flake8 --exclude=env .