-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (35 loc) · 1.21 KB
/
Copy pathMakefile
File metadata and controls
42 lines (35 loc) · 1.21 KB
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
VERSION := $(shell git rev-parse HEAD)
BUILD_DATE := $(shell date -R)
VCS_URL := $(shell basename `git rev-parse --show-toplevel`)
VCS_REF := $(shell git log -1 --pretty=%h)
NAME := $(shell basename `git rev-parse --show-toplevel`)
VENDOR := $(shell whoami)
nginx-cert:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ./cert/nginx.key -out ./cert/nginx.cert -subj '/CN=nginx'
print:
@echo VERSION=${VERSION}
@echo BUILD_DATE=${BUILD_DATE}
@echo VCS_URL=${VCS_URL}
@echo VCS_REF=${VCS_REF}
@echo NAME=${NAME}
@echo VENDOR=${VENDOR}
build-server:
cd grpc_book_service_backend && docker build -t tanmayb/grpc-book-server --build-arg VERSION="${VERSION}" \
--build-arg BUILD_DATE="${BUILD_DATE}" \
--build-arg VCS_URL="${VCS_URL}" \
--build-arg VCS_REF="${VCS_REF}" \
--build-arg NAME="${NAME}" \
--build-arg VENDOR="${VENDOR}" .
build-client:
cd client && docker build -t tanmayb/grpc-book-client --build-arg VERSION="${VERSION}" \
--build-arg BUILD_DATE="${BUILD_DATE}" \
--build-arg VCS_URL="${VCS_URL}" \
--build-arg VCS_REF="${VCS_REF}" \
--build-arg NAME="${NAME}" \
--build-arg VENDOR="${VENDOR}" .
up:
@docker-compose up -d
down:
@docker-compose down
test-client:
@docker-compose up client