diff --git a/Makefile b/Makefile index 153be05..2291035 100644 --- a/Makefile +++ b/Makefile @@ -55,5 +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 $(PRIVATE_REGISTRY)/filvenus/venus-wallet:$(TAG) + 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