This commit is contained in:
parent
cff0644ccb
commit
78418b230d
@ -25,5 +25,5 @@ RUN chmod 755 /entrypoint.sh
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["/app"]
|
||||
CMD ["sh", "-c", "/app"]
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
@ -20,6 +20,6 @@ waitForService "api-registry:8500"
|
||||
# waitForService "api-eventbus:5672"
|
||||
|
||||
|
||||
set -euo pipefail
|
||||
# set -euo pipefail
|
||||
|
||||
exec "$@"
|
||||
|
@ -3,7 +3,7 @@ module git.pbiernat.dev/egommerce/identity-service
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
git.pbiernat.dev/egommerce/go-api-pkg v0.0.111
|
||||
git.pbiernat.dev/egommerce/go-api-pkg v0.0.113
|
||||
github.com/gofiber/fiber/v2 v2.40.1
|
||||
github.com/gofiber/jwt/v2 v2.2.7
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible
|
||||
|
@ -16,6 +16,10 @@ git.pbiernat.dev/egommerce/go-api-pkg v0.0.110 h1:GLFO4LPYSw1nNBizssgo+alsaGhf33
|
||||
git.pbiernat.dev/egommerce/go-api-pkg v0.0.110/go.mod h1:nAwcw2MZtn/54YKq8VQK6RJAsiuoLUtPuazXg8JcqK8=
|
||||
git.pbiernat.dev/egommerce/go-api-pkg v0.0.111 h1:+OjaodnVXQC1w3nlK3VBy1HswxbduvHVga5UyH52yK4=
|
||||
git.pbiernat.dev/egommerce/go-api-pkg v0.0.111/go.mod h1:nAwcw2MZtn/54YKq8VQK6RJAsiuoLUtPuazXg8JcqK8=
|
||||
git.pbiernat.dev/egommerce/go-api-pkg v0.0.112 h1:opyN5gb1tOfbLDFilJbHuPaVClLqBe/FPLO6qYJFy/s=
|
||||
git.pbiernat.dev/egommerce/go-api-pkg v0.0.112/go.mod h1:nAwcw2MZtn/54YKq8VQK6RJAsiuoLUtPuazXg8JcqK8=
|
||||
git.pbiernat.dev/egommerce/go-api-pkg v0.0.113 h1:kf7HesezhXIAMNYgLCm8x6YVqyLqJRqaPKIFEXf4xSs=
|
||||
git.pbiernat.dev/egommerce/go-api-pkg v0.0.113/go.mod h1:nAwcw2MZtn/54YKq8VQK6RJAsiuoLUtPuazXg8JcqK8=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
|
||||
github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
|
||||
|
@ -3,6 +3,7 @@ package server
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/signal"
|
||||
@ -49,6 +50,7 @@ func NewServer(conf *Config, logger *fluentd.Logger, db *pgxpool.Pool /*, ebCh *
|
||||
ReadTimeout: time.Millisecond * 50,
|
||||
WriteTimeout: time.Millisecond * 50,
|
||||
IdleTimeout: time.Millisecond * 50,
|
||||
// Prefork: true,
|
||||
}
|
||||
s := &Server{
|
||||
fiber.New(cnf),
|
||||
@ -122,6 +124,10 @@ func (s *Server) updateKVConfig() error {
|
||||
return err
|
||||
}
|
||||
|
||||
if config == nil {
|
||||
return errors.New("empty KV config data")
|
||||
}
|
||||
|
||||
buf := bytes.NewBuffer(config.Value)
|
||||
decoder := json.NewDecoder(buf)
|
||||
if err := decoder.Decode(&s.conf); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user