forked from codeforpdx/recordexpungPDX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (30 loc) · 783 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
38
39
40
.PHONY: install run clean
install:
pipenv install '-e .'
run: install
pipenv run flask run
clean:
find . -type f -name \*~ | xargs rm
find . -type f -name \*pyc | xargs rm
rm -rf src/backend/*.egg-info
IMAGES := database_image
STACK_NAME := recordexpungpdx
DB_NAME := record_expunge
DB_CONTAINER_NAME := db
dev: dev_deploy
echo $@
dev_deploy: $(IMAGES)
echo $@
docker stack deploy -c docker-compose.yml $(STACK_NAME)
dev_stop:
echo $@
docker stack rm $(STACK_NAME)
dev_psql:
docker exec -ti $$(docker ps -qf name=$(DB_CONTAINER_NAME)) psql -U postgres -d $(DB_NAME)
database_image:
echo $@
docker build --no-cache -t $(STACK_NAME):database config/postgres
dblogs:
docker logs --details -ft $$(docker ps -qf name=$(DB_CONTAINER_NAME))
test:
pipenv run pytest