forked from junhanlin/tutorial-order
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
38 lines (26 loc) · 753 Bytes
/
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
#!make
include .env
export $(shell sed 's/=.*//' .env)
DOCKER_COMPOSE_FILE ?= docker-compose.yml
#========================#
#== DEVELOPMENT ==#
#========================#
up:
docker compose -f ${DOCKER_COMPOSE_FILE} up -d --remove-orphans
down:
docker compose -f ${DOCKER_COMPOSE_FILE} down
install:
go mod download && \
go mod tidy
update-codegen:
mkdir -p pkg/generated && \
protoc --proto_path=./proto:/usr/local/include --go_out=./pkg/generated --go-grpc_out=./pkg/generated $(shell find proto -type f -name '*.proto')
#========================#
#== BUILD & RUN ==#
#========================#
build:
go build -o bin/server cmd/main.go
run:
go run cmd/main.go
run-mirrord:
mirrord exec -f .mirrord/mirrord.json go run cmd/main.go