-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (43 loc) · 1.32 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
.PHONY: dev-setup dev lint load-test test build run build-and-run \
clean-fe clean-be cleanall build-frontend build-backend deploy
all:
# === DEV RELATED ===
dev-setup: # local dev
poetry install
cd frontend; npm install; cd ..
dev:
docker-compose up -d db
scripts/dev.sh
lint:
-isort backend && black backend && flake8 backend
-isort tests && black tests && flake8 tests
cd frontend && npm run lint && cd ..
load-test: # interactive
locust -f tests/locustfile.py
test:
docker-compose up -d db
pytest
build:
docker-compose build
run:
docker-compose up
build-and-run: build run
# === DOCKERFILE PRODUCTION BUILD ===
clean-fe:
-rm -r frontend/dist
clean-be:
-rm -r dist backend/templates backend/static
cleanall: clean-fe clean-be
build-frontend: clean-fe
scripts/build_frontend.sh
build-backend: clean-be
scripts/build_backend.sh
# === GCP DEPLOY ===
gcp-deploy: # FIXME no DB access
docker-compose build app
# tag for us-west1
docker tag waypoints_app:latest us-west1-docker.pkg.dev/waypoints-demo/waypoints-demo/waypoints_app:latest
docker push us-west1-docker.pkg.dev/waypoints-demo/waypoints-demo/waypoints_app:latest
gcloud run deploy --image us-west1-docker.pkg.dev/waypoints-demo/waypoints-demo/waypoints_app:latest
gcp-wipe:
gcloud artifacts repositories delete waypoints-demo --location=us-west1