feat/refactor #12
3
Makefile
3
Makefile
|
@ -23,7 +23,6 @@ fmt: # 格式優化
|
||||||
.PHONY: gen-rpc
|
.PHONY: gen-rpc
|
||||||
gen-rpc: # 建立 rpc code
|
gen-rpc: # 建立 rpc code
|
||||||
$(GO_CTL_NAME) rpc protoc ./generate/protobuf/notification.proto -m --style=$(GO_ZERO_STYLE) --go_out=./gen_result/pb --go-grpc_out=./gen_result/pb --zrpc_out=.
|
$(GO_CTL_NAME) rpc protoc ./generate/protobuf/notification.proto -m --style=$(GO_ZERO_STYLE) --go_out=./gen_result/pb --go-grpc_out=./gen_result/pb --zrpc_out=.
|
||||||
copy ./etc/service.yaml ./etc/service.example.yaml
|
|
||||||
go mod tidy
|
go mod tidy
|
||||||
@echo "Generate core-api files successfully"
|
@echo "Generate core-api files successfully"
|
||||||
|
|
||||||
|
@ -45,6 +44,6 @@ run-docker: # 建立 rpc code
|
||||||
.PHONY: build-docker
|
.PHONY: build-docker
|
||||||
build-docker:
|
build-docker:
|
||||||
cp ./build/Dockerfile Dockerfile
|
cp ./build/Dockerfile Dockerfile
|
||||||
docker buildx build -t $(DOCKER_REPO):$(VERSION) --build-arg SSH_PRIVATE_KEY="$(cat ~/.ssh/ed_25519)" .
|
docker buildx build -t $(DOCKER_REPO):$(VERSION) --build-arg SSH_PRIVATE_KEY="$(cat ~/.ssh/id_ed25519)" .
|
||||||
rm -rf Dockerfile
|
rm -rf Dockerfile
|
||||||
@echo "Generate core-api files successfully"
|
@echo "Generate core-api files successfully"
|
||||||
|
|
|
@ -41,7 +41,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \
|
||||||
FROM gcr.io/distroless/static-debian11
|
FROM gcr.io/distroless/static-debian11
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY --from=builder /app/service /app/service
|
COPY --from=builder /app /app
|
||||||
COPY --from=builder /app/etc/service.yaml /app/etc/service.yaml
|
COPY --from=builder /app/etc/notification.yaml /app/etc/notification.yaml
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
CMD ["/app/notification"]
|
CMD ["/app/notification"]
|
Loading…
Reference in New Issue