From 31d396a125963595b3b60f9d92a993d48b33c6c5 Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Fri, 16 Dec 2022 11:45:27 +0300 Subject: [PATCH] [#2] Update building Signed-off-by: Denis Kirillov --- Dockerfile | 4 ++-- Dockerfile.dirty | 4 ++-- Makefile | 10 +++++----- README.md | 2 +- app.go | 4 ++-- settings.go | 6 +++--- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index b3ac08f..189dc22 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,6 @@ FROM scratch WORKDIR / COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -COPY --from=builder /src/bin/neofs-http-gw /bin/neofs-http-gw +COPY --from=builder /src/bin/frostfs-http-gw /bin/frostfs-http-gw -ENTRYPOINT ["/bin/neofs-http-gw"] +ENTRYPOINT ["/bin/frostfs-http-gw"] diff --git a/Dockerfile.dirty b/Dockerfile.dirty index c17734b..f733447 100644 --- a/Dockerfile.dirty +++ b/Dockerfile.dirty @@ -3,6 +3,6 @@ RUN apk add --update --no-cache bash ca-certificates WORKDIR / -COPY bin/neofs-http-gw /bin/neofs-http-gw +COPY bin/frostfs-http-gw /bin/frostfs-http-gw -CMD ["neofs-http-gw"] +CMD ["frostfs-http-gw"] diff --git a/Makefile b/Makefile index 3bea558..41abb24 100644 --- a/Makefile +++ b/Makefile @@ -6,13 +6,13 @@ GO_VERSION ?= 1.19 LINT_VERSION ?= 1.49.0 BUILD ?= $(shell date -u --iso=seconds) -HUB_IMAGE ?= nspccdev/neofs-http-gw +HUB_IMAGE ?= truecloudlab/frostfs-http-gw HUB_TAG ?= "$(shell echo ${VERSION} | sed 's/^v//')" # List of binaries to build. For now just one. BINDIR = bin DIRS = $(BINDIR) -BINS = $(BINDIR)/neofs-http-gw +BINS = $(BINDIR)/frostfs-http-gw .PHONY: all $(BINS) $(DIRS) dep docker/ test cover fmt image image-push dirty-image lint docker/lint version clean @@ -74,7 +74,7 @@ fmt: # Build clean Docker image image: - @echo "⇒ Build NeoFS HTTP Gateway docker image " + @echo "⇒ Build FrostFS HTTP Gateway docker image " @docker build \ --build-arg REPO=$(REPO) \ --build-arg VERSION=$(VERSION) \ @@ -89,7 +89,7 @@ image-push: # Build dirty Docker image dirty-image: - @echo "⇒ Build NeoFS HTTP Gateway dirty docker image " + @echo "⇒ Build FrostFS HTTP Gateway dirty docker image " @docker build \ --build-arg REPO=$(REPO) \ --build-arg VERSION=$(VERSION) \ @@ -120,7 +120,7 @@ clean: # Package for Debian debpackage: - dch --package neofs-http-gw \ + dch --package frostfs-http-gw \ --controlmaint \ --newversion $(PKG_VERSION) \ --distribution $(OS_RELEASE) \ diff --git a/README.md b/README.md index 69ea624..0c05b60 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ version Show current version ``` Or you can also use a [Docker -image](https://hub.docker.com/r/nspccdev/neofs-http-gw) provided for the released +image](https://hub.docker.com/r/truecloudlab/frostfs-http-gw) provided for the released (and occasionally unreleased) versions of the gateway (`:latest` points to the latest stable release). diff --git a/app.go b/app.go index 0cea989..80c36f0 100644 --- a/app.go +++ b/app.go @@ -111,7 +111,7 @@ func newApp(ctx context.Context, opt ...Option) App { } // -- setup FastHTTP server -- - a.webServer.Name = "neofs-http-gw" + a.webServer.Name = "frost-http-gw" a.webServer.ReadBufferSize = a.cfg.GetInt(cfgWebReadBufferSize) a.webServer.WriteBufferSize = a.cfg.GetInt(cfgWebWriteBufferSize) a.webServer.ReadTimeout = a.cfg.GetDuration(cfgWebReadTimeout) @@ -327,7 +327,7 @@ func getKeyFromWallet(w *wallet.Wallet, addrStr string, password *string) (*ecds } func (a *app) Wait() { - a.log.Info("starting application", zap.String("app_name", "neofs-http-gw"), zap.String("version", Version)) + a.log.Info("starting application", zap.String("app_name", "frostfs-http-gw"), zap.String("version", Version)) a.setHealthStatus() diff --git a/settings.go b/settings.go index 526f48d..c6ee33f 100644 --- a/settings.go +++ b/settings.go @@ -123,7 +123,7 @@ func settings() *viper.Viper { flags.String(cmdListenAddress, "0.0.0.0:8080", "addresses to listen") flags.String(cfgTLSCertFile, "", "TLS certificate path") flags.String(cfgTLSKeyFile, "", "TLS key path") - peers := flags.StringArrayP(cfgPeers, "p", nil, "NeoFS nodes") + peers := flags.StringArrayP(cfgPeers, "p", nil, "FrostFS nodes") resolveMethods := flags.StringSlice(cfgResolveOrder, []string{resolver.NNSResolver, resolver.DNSResolver}, "set container name resolve order") @@ -197,7 +197,7 @@ func settings() *viper.Viper { switch { case help != nil && *help: - fmt.Printf("NeoFS HTTP Gateway %s\n", Version) + fmt.Printf("FrostFS HTTP Gateway %s\n", Version) flags.PrintDefaults() fmt.Println() @@ -229,7 +229,7 @@ func settings() *viper.Viper { os.Exit(0) case version != nil && *version: - fmt.Printf("NeoFS HTTP Gateway\nVersion: %s\nGoVersion: %s\n", Version, runtime.Version()) + fmt.Printf("FrostFS HTTP Gateway\nVersion: %s\nGoVersion: %s\n", Version, runtime.Version()) os.Exit(0) }