Skip to content

Commit

Permalink
fix: adjustments for health checks
Browse files Browse the repository at this point in the history
  • Loading branch information
cfoust committed Sep 15, 2023
1 parent 8204705 commit c9961d0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ fi

CLIENT_CONFIG=$(echo "$SOUR_CONFIG" | jq '.client')
# Inject the runtime configuration into the frontend's code
echo "const INJECTED_SOUR_CONFIG = $CLIENT_CONFIG;" >> /tmp/out.js
cat /app/index.js >> /tmp/out.js
cp /tmp/out.js /app/index.js
# When a container is restarted, the previous FS state still exists, so detect this
if ! grep -q "INJECTED_SOUR_CONFIG" /app/index.js; then
echo "const INJECTED_SOUR_CONFIG = $CLIENT_CONFIG;" >> /tmp/out.js
cat /app/index.js >> /tmp/out.js
cp /tmp/out.js /app/index.js
fi

wsproxy 28785 &
nginx -g 'daemon off;' &
Expand Down
2 changes: 1 addition & 1 deletion services/go/pkg/assets/roots.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func NewRemoteRoot(

var index Index
if err := cbor.Unmarshal(indexData, &index); err != nil {
return nil, err
return nil, fmt.Errorf("error decoding %s: %s", url, err)
}

root := RemoteRoot{
Expand Down
2 changes: 1 addition & 1 deletion services/go/svc/cluster/ingress/ws.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ func (server *WSIngress) ServeHTTP(w http.ResponseWriter, r *http.Request) {
})

if err != nil {
log.Error().Err(err).Msg("error accepting client connection")
// ignore invalid requests
return
}

Expand Down

0 comments on commit c9961d0

Please sign in to comment.