-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
68 lines (47 loc) · 1.59 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
66
67
68
first-run: install download-data clean-db
first-run-no-docker: install download-data migrate-up etl
first-run-windows: install download-data clean-db-windows
first-run-windows-no-docker: install download-data migrate-up-windows etl
.PHONY: wait-for-postgres
wait-for-postgres:
$(shell ./scripts/wait-for-postgres-local.sh)
install:
npm install
cd server && npm install
start-ui:
npm run start-ui
start-api:
cd server && npm run start-dev
start:
npm run start-dev
.PHONY: build
build:
npm run build-ui
rm -rf server/build
mv build server/build
cd server && npm run build
start-prod:
cd server/ && NODE_ENV=production npm run start
start-prod-local:
cd server/ && NODE_ENV=production DB_IGNORE_SSL=true npm run start
refresh-docker:
docker-compose -f docker-compose.yml down -v
docker-compose -f docker-compose.yml up -d
clean-db: refresh-docker wait-for-postgres migrate-up etl
clean-db-windows: refresh-docker wait-for-postgres migrate-up-windows etl
etl:
cd server && npm exec ts-node bin/etl.ts
migrate-up:
cd server && npm run migrate up
migrate-up-windows:
cd server && npm run migrate-no-dot-env up
migrate-down:
cd server && npm run migrate down
build-dictionary:
cd scripts && node createDataDictionary
test-server:
cd server && npm run test
download-data:
$(info WARNING: automatic downloads do not work. Download a copy of the data from here: https://drive.google.com/uc?export=download&id=1AJOrBuTeGPYyXsXNs4XzX7a5QloZVTGV)
$(info WARNING (cont.): Copy the extracted CSV files to ./server/tmp)
# cd server/tmp && ../../scripts/gdownloader.sh && node ../../scripts/extractor.js