-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (32 loc) · 1.09 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
.PHONY: users db-up db-down
users:
go run main.go ./env/.env.users
project:
go run main.go ./env/.env.project
datacenter:
go run main.go ./env/.env.datacenter
db-up:
docker compose -f docker-compose.db.yaml up -d
db-stop:
docker compose -f docker-compose.db.yaml stop
# migrate project is includes 3 database migration
migrate-project:
go run ./pkg/database/script/migration.go ./env/.env.project
migrate-users:
go run ./pkg/database/script/migration.go ./env/.env.users
grpc-path:
export PATH="$PATH:$(go env GOPATH)/bin"
grpc-fav:
protoc --go_out=. --go_opt=paths=source_relative \
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
modules/favorite/favoritePb/favoritePb.proto
grpc-datacenter:
protoc --go_out=. --go_opt=paths=source_relative \
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
modules/datacenter/datacenterPb/datacenterPb.proto
grpc-users:
protoc --go_out=. --go_opt=paths=source_relative \
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
modules/users/usersPb/usersPb.proto
# db-down:
# docker compose -f docker-compose.db.yaml down