-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
50 lines (38 loc) · 1.21 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
.PHONY: build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o api-gateway *.go
.PHONY: image
image:
docker build . -t dms-sms-api-gateway:${VERSION}
.PHONY: upload
upload:
docker tag dms-sms-api-gateway:${VERSION} jinhong0719/dms-sms-api-gateway:${VERSION}.RELEASE
docker push jinhong0719/dms-sms-api-gateway:${VERSION}.RELEASE
.PHONY: pull
pull:
docker pull jinhong0719/dms-sms-api-gateway:${VERSION}.RELEASE
.PHONY: run
run:
docker-compose -f ./docker-compose.yml up -d
.PHONY: service
service:
kubectl apply -f .k8s/gateway/api-gateway-service.yaml
.PHONY: log_volume
log_volume:
kubectl apply -f .k8s/log/log-data-persistentvolume.yaml
kubectl apply -f .k8s/log/log-data-persistentvolumeclaim.yaml
.PHONY: api_gateway_deploy
deploy:
envsubst < .k8s/gateway/api-gateway-deployment.yaml | kubectl apply -f -
.PHONY: filebeat_run
filebeat_run:
docker-compose -f ./filebeat-docker-compose.yml up -d
.PHONY: filebeat_deploy
filebeat_deploy:
envsubst < .k8s/filebeat/filebeat-deployment.yaml | kubectl apply -f -
.PHONY: stack
stack:
env VERSION=${VERSION} docker stack deploy -c docker-compose.yml DSM_SMS
.PHONY: filebeat_stack
filebeat_stack:
docker stack deploy -c filebeat-docker-compose.yml DSM_SMS