-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (44 loc) · 1.02 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
.PHONY: build destroy down logs reset schema up test
COMPOSE = docker compose -f docker-compose.yml -f docker-compose-dev.yml
FLASK = $(COMPOSE) run --rm app flask
WEBPACK = $(COMPOSE) run --rm webpack
build: .env
$(COMPOSE) pull
$(COMPOSE) build
$(WEBPACK) npm install
up:
$(COMPOSE) up -d
down:
$(COMPOSE) down
init: build up db-schema seed
logs:
$(COMPOSE) logs --tail=500 -f
db-migration:
$(FLASK) db migrate -m '$(MESSAGE)'
db-schema:
$(FLASK) db upgrade
db-truncate:
$(FLASK) db_truncate
test:
$(COMPOSE) exec app pytest ${TEST_PATH}
cli:
$(COMPOSE) exec app bash
.env:
cp .env.dist .env
import_people:
$(FLASK) import_people
enrich_people:
$(FLASK) enrich_people
import_verdicts:
$(FLASK) import_verdicts
enrich_verdicts:
$(FLASK) enrich_verdicts
import_static: import_institutions import_procedure_types import_legal_areas
import_institutions:
$(FLASK) import_institutions
import_legal_areas:
$(FLASK) import_legal_areas
import_procedure_types:
$(FLASK) import_procedure_types
seed:
$(FLASK) seed