forked from TrueCloudLab/frostfs-http-gw
[#2] Update building
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
a014fb96fc
commit
31d396a125
6 changed files with 15 additions and 15 deletions
|
@ -18,6 +18,6 @@ FROM scratch
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
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"]
|
||||||
|
|
|
@ -3,6 +3,6 @@ RUN apk add --update --no-cache bash ca-certificates
|
||||||
|
|
||||||
WORKDIR /
|
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"]
|
||||||
|
|
10
Makefile
10
Makefile
|
@ -6,13 +6,13 @@ GO_VERSION ?= 1.19
|
||||||
LINT_VERSION ?= 1.49.0
|
LINT_VERSION ?= 1.49.0
|
||||||
BUILD ?= $(shell date -u --iso=seconds)
|
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//')"
|
HUB_TAG ?= "$(shell echo ${VERSION} | sed 's/^v//')"
|
||||||
|
|
||||||
# List of binaries to build. For now just one.
|
# List of binaries to build. For now just one.
|
||||||
BINDIR = bin
|
BINDIR = bin
|
||||||
DIRS = $(BINDIR)
|
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
|
.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
|
# Build clean Docker image
|
||||||
image:
|
image:
|
||||||
@echo "⇒ Build NeoFS HTTP Gateway docker image "
|
@echo "⇒ Build FrostFS HTTP Gateway docker image "
|
||||||
@docker build \
|
@docker build \
|
||||||
--build-arg REPO=$(REPO) \
|
--build-arg REPO=$(REPO) \
|
||||||
--build-arg VERSION=$(VERSION) \
|
--build-arg VERSION=$(VERSION) \
|
||||||
|
@ -89,7 +89,7 @@ image-push:
|
||||||
|
|
||||||
# Build dirty Docker image
|
# Build dirty Docker image
|
||||||
dirty-image:
|
dirty-image:
|
||||||
@echo "⇒ Build NeoFS HTTP Gateway dirty docker image "
|
@echo "⇒ Build FrostFS HTTP Gateway dirty docker image "
|
||||||
@docker build \
|
@docker build \
|
||||||
--build-arg REPO=$(REPO) \
|
--build-arg REPO=$(REPO) \
|
||||||
--build-arg VERSION=$(VERSION) \
|
--build-arg VERSION=$(VERSION) \
|
||||||
|
@ -120,7 +120,7 @@ clean:
|
||||||
|
|
||||||
# Package for Debian
|
# Package for Debian
|
||||||
debpackage:
|
debpackage:
|
||||||
dch --package neofs-http-gw \
|
dch --package frostfs-http-gw \
|
||||||
--controlmaint \
|
--controlmaint \
|
||||||
--newversion $(PKG_VERSION) \
|
--newversion $(PKG_VERSION) \
|
||||||
--distribution $(OS_RELEASE) \
|
--distribution $(OS_RELEASE) \
|
||||||
|
|
|
@ -38,7 +38,7 @@ version Show current version
|
||||||
```
|
```
|
||||||
|
|
||||||
Or you can also use a [Docker
|
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
|
(and occasionally unreleased) versions of the gateway (`:latest` points to the
|
||||||
latest stable release).
|
latest stable release).
|
||||||
|
|
||||||
|
|
4
app.go
4
app.go
|
@ -111,7 +111,7 @@ func newApp(ctx context.Context, opt ...Option) App {
|
||||||
}
|
}
|
||||||
|
|
||||||
// -- setup FastHTTP server --
|
// -- setup FastHTTP server --
|
||||||
a.webServer.Name = "neofs-http-gw"
|
a.webServer.Name = "frost-http-gw"
|
||||||
a.webServer.ReadBufferSize = a.cfg.GetInt(cfgWebReadBufferSize)
|
a.webServer.ReadBufferSize = a.cfg.GetInt(cfgWebReadBufferSize)
|
||||||
a.webServer.WriteBufferSize = a.cfg.GetInt(cfgWebWriteBufferSize)
|
a.webServer.WriteBufferSize = a.cfg.GetInt(cfgWebWriteBufferSize)
|
||||||
a.webServer.ReadTimeout = a.cfg.GetDuration(cfgWebReadTimeout)
|
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() {
|
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()
|
a.setHealthStatus()
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@ func settings() *viper.Viper {
|
||||||
flags.String(cmdListenAddress, "0.0.0.0:8080", "addresses to listen")
|
flags.String(cmdListenAddress, "0.0.0.0:8080", "addresses to listen")
|
||||||
flags.String(cfgTLSCertFile, "", "TLS certificate path")
|
flags.String(cfgTLSCertFile, "", "TLS certificate path")
|
||||||
flags.String(cfgTLSKeyFile, "", "TLS key 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")
|
resolveMethods := flags.StringSlice(cfgResolveOrder, []string{resolver.NNSResolver, resolver.DNSResolver}, "set container name resolve order")
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ func settings() *viper.Viper {
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case help != nil && *help:
|
case help != nil && *help:
|
||||||
fmt.Printf("NeoFS HTTP Gateway %s\n", Version)
|
fmt.Printf("FrostFS HTTP Gateway %s\n", Version)
|
||||||
flags.PrintDefaults()
|
flags.PrintDefaults()
|
||||||
|
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
|
@ -229,7 +229,7 @@ func settings() *viper.Viper {
|
||||||
|
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
case version != nil && *version:
|
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)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue