This repository has been archived by the owner on Oct 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
51 lines (43 loc) · 1.58 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
export PROJECT_ID=cs61a-140900
.PHONY: exam-deploy
exam-deploy:
cd apps/exam && gcloud functions deploy exam-server --runtime python37 --trigger-http --entry-point index
.PHONY: exam-dev
exam-dev:
export MODE=exam; \
export FLASK_APP=run_local; \
export GOOGLE_APPLICATION_CREDENTIALS=$(shell pwd)/creds.json; \
export ENV=dev; \
yarn run concurrently webpack "cd apps && python run_local.py"
.PHONY: admin-deploy
admin-deploy:
cd apps/admin && gcloud functions deploy exam-admin --runtime python37 --trigger-http --entry-point index --timeout 500
.PHONY: admin-dev
admin-dev:
export MODE=admin; \
export FLASK_APP=run_local; \
export GOOGLE_APPLICATION_CREDENTIALS=$(shell pwd)/creds.json; \
export ENV=dev; \
yarn run concurrently webpack "cd apps && flask run"
.PHONY: write-dev
write-dev:
export MODE=write; \
export FLASK_APP=run_local; \
export GOOGLE_APPLICATION_CREDENTIALS=$(shell pwd)/creds.json; \
export ENV=dev; \
yarn run concurrently webpack "cd apps && python run_local.py"
.PHONY: write-deploy
write-deploy:
cd apps/write && \
gcloud builds submit --tag gcr.io/$(PROJECT_ID)/staff-exam-server && \
gcloud run deploy --image gcr.io/$(PROJECT_ID)/staff-exam-server --platform managed
.PHONY: alerts-deploy
alerts-deploy:
cd apps/alerts && gcloud functions deploy exam-alerts --runtime python37 --trigger-http --entry-point index --timeout 500
.PHONY: alerts-dev
alerts-dev:
export MODE=alerts; \
export FLASK_APP=run_local; \
export GOOGLE_APPLICATION_CREDENTIALS=$(shell pwd)/creds.json; \
export ENV=dev; \
yarn run concurrently webpack "cd apps && python run_local.py"