From b401aaa672579af85ce9a9826f6031c4ff467c14 Mon Sep 17 00:00:00 2001 From: hunjixin <1084400399@qq.com> Date: Fri, 24 Mar 2023 13:17:29 +0800 Subject: [PATCH 1/3] feat: add docker push --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 153be05..571b977 100644 --- a/Makefile +++ b/Makefile @@ -57,3 +57,8 @@ docker: docker build --build-arg https_proxy=$(BUILD_DOCKER_PROXY) --build-arg BUILD_TARGET=venus-wallet -t venus-wallet . docker tag venus-wallet filvenus/venus-wallet:$(TAG) .PHONY: docker + + +docker-push: docker + docker push filvenus/venus-wallet:$(TAG) + From 4605af1d292a4a69de9e1d728a53c24627c99b22 Mon Sep 17 00:00:00 2001 From: hunjixin <1084400399@qq.com> Date: Tue, 28 Mar 2023 11:53:53 +0800 Subject: [PATCH 2/3] feat: add private registry tag --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 571b977..2291035 100644 --- a/Makefile +++ b/Makefile @@ -55,10 +55,9 @@ TAG:=test docker: curl -O https://raw.githubusercontent.com/filecoin-project/venus-docs/master/script/docker/dockerfile docker build --build-arg https_proxy=$(BUILD_DOCKER_PROXY) --build-arg BUILD_TARGET=venus-wallet -t venus-wallet . - docker tag venus-wallet filvenus/venus-wallet:$(TAG) + docker tag venus-wallet $(PRIVATE_REGISTRY)/filvenus/venus-wallet:$(TAG) .PHONY: docker - docker-push: docker - docker push filvenus/venus-wallet:$(TAG) + docker push $(PRIVATE_REGISTRY)/filvenus/venus-wallet:$(TAG) From dce867332c04ffdd86f9af7585ffb41e76154e72 Mon Sep 17 00:00:00 2001 From: hunjixin <1084400399@qq.com> Date: Fri, 24 Feb 2023 14:58:56 +0800 Subject: [PATCH 3/3] feat: add status api to detect api ready --- cmd/rpc.go | 2 ++ go.mod | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/rpc.go b/cmd/rpc.go index e119cd6..a9cd83a 100644 --- a/cmd/rpc.go +++ b/cmd/rpc.go @@ -10,6 +10,7 @@ import ( "strings" "syscall" + "github.com/etherlabsio/healthcheck/v2" "github.com/filecoin-project/go-jsonrpc" "github.com/filecoin-project/go-jsonrpc/auth" "github.com/filecoin-project/venus-wallet/api" @@ -48,6 +49,7 @@ func ServeRPC(a api.IFullAPI, stop build.StopFunc, addr string, sigChan chan os. Next: rpcServer.ServeHTTP, } http.Handle("/rpc/v0", CorsMiddleWare(ah)) + http.Handle("/healthcheck", healthcheck.Handler()) ma, err := multiaddr.NewMultiaddr(addr) if err != nil { return nil diff --git a/go.mod b/go.mod index b0c2025..bf1d499 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( contrib.go.opencensus.io/exporter/jaeger v0.2.1 github.com/BurntSushi/toml v1.2.1 github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef + github.com/etherlabsio/healthcheck/v2 v2.0.0 github.com/filecoin-project/go-address v1.1.0 github.com/filecoin-project/go-cbor-util v0.0.1 github.com/filecoin-project/go-crypto v0.0.1 @@ -63,7 +64,6 @@ require ( github.com/dgraph-io/ristretto v0.1.0 // indirect github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 // indirect github.com/dustin/go-humanize v1.0.0 // indirect - github.com/etherlabsio/healthcheck/v2 v2.0.0 // indirect github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20201006184820-924ee87a1349 // indirect github.com/filecoin-project/go-amt-ipld/v3 v3.1.0 // indirect github.com/filecoin-project/go-amt-ipld/v4 v4.0.0 // indirect