forked from brandnetworks/base-flask-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (28 loc) · 681 Bytes
/
Makefile
File metadata and controls
38 lines (28 loc) · 681 Bytes
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
SRC_FILES=$(shell find . -name '*.py' | grep -v 'venv')
DOCKER_IP=$(shell boot2docker ip)
all: docker
install:
pip install -r requirements.txt
lint:
flake8 $(SRC_FILES)
test: lint
python -m unittest discover
docker: test
docker build -t geowa4/base-flask-api .
clean:
docker-compose kill
docker-compose rm -f
dev: clean
docker-compose up -d db
DATABASE_URI=postgresql://base_api:pwgen_-sny_40@$(DOCKER_IP):5432/postgres \
./run.py
dev-docker: clean
docker-compose build
docker-compose up -d
watch: dev-docker
watchmedo shell-command \
--patterns="*.py" \
--recursive \
--command='make dev-docker' \
.
.PHONY: install lint test docker clean dev watch