-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (27 loc) · 969 Bytes
/
Makefile
File metadata and controls
36 lines (27 loc) · 969 Bytes
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
.PHONY: fmt lint dev-fe start-be build-images init-service proto clean
FRONTEND = lean-state-search
BACKEND = state-search-be
fmt:
(cd protos && buf format -w)
(cd ${FRONTEND} && prettier . -w )
(cd ${BACKEND} && ruff format .)
lint:
(cd ${BACKEND} && ruff check .)
(cd protos && buf lint)
(cd ${FRONTEND} && pnpm lint)
dev-fe:
(cd ${FRONTEND} && PORT=${FRONTEND_PORT} pnpm run dev)
start-be:
(cd ${BACKEND} && poetry run python main.py)
build-images:
(cd ${FRONTEND} && MODE=docker docker build -t ${FRONTEND}:latest .)
(cd ${BACKEND} && MODE=docker docker build -t ${BACKEND}:latest .)
init-service:
(docker compose up --wait)
(sleep 5 && ./scripts/init-pg.sh)
(cd ${BACKEND} && poetry install && poetry run prisma db push)
proto:
(cd protos && buf generate)
(cd ${FRONTEND} && pnpm i && rm -rf lib/gen && pnpm exec buf generate ../protos/state_search/v1/state_search.proto)
clean:
(cd scripts/ && docker-compose down && docker-compose rm -f)