Skip to content

Commit

Permalink
Merge pull request #2842 from andrewghobrial/improve-performance
Browse files Browse the repository at this point in the history
Improve performance
  • Loading branch information
nwmac authored Aug 16, 2018
2 parents 123e721 + 5f78b31 commit 742f2cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deploy/Dockerfile.all-in-one
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY --chown=stratos:users deploy/db deploy/db
COPY --chown=stratos:users deploy/all-in-one/config.all-in-one.properties config.properties

RUN npm install \
&& npm run build-cf \
&& npm run build \
&& npm run build-backend \
&& npm run deploy-cf

Expand Down
3 changes: 2 additions & 1 deletion src/backend/app-core/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,7 @@ func (p *portalProxy) registerRoutes(e *echo.Echo, addSetupMiddleware *setupMidd
if err == nil {
log.Debug("Add URL Check Middleware")
e.Use(p.urlCheckMiddleware)
e.Use(middleware.Gzip())
e.Static("/", staticDir)
e.SetHTTPErrorHandler(getUICustomHTTPErrorHandler(staticDir, e.DefaultHTTPErrorHandler))
log.Info("Serving static UI resources")
Expand All @@ -760,7 +761,7 @@ func getUICustomHTTPErrorHandler(staticDir string, defaultHandler echo.HTTPError
}

func getStaticFiles() (string, error) {
dir, err := filepath.Abs(filepath.Dir(os.Args[0]))
dir, err := filepath.Abs(".")
if err == nil {
// Look for a folder named 'ui'
_, err := os.Stat(dir + "/ui")
Expand Down

0 comments on commit 742f2cf

Please sign in to comment.