Fix issue with asset packer breaking Docker builds

This commit is contained in:
Vikram Rangnekar
2019-03-28 09:38:05 -04:00
parent 516939bf26
commit f37ee50f7b
5 changed files with 33 additions and 19 deletions

2
serv/.gitignore vendored
View File

@ -1 +1 @@
rice-box.go
static.go

View File

@ -8,7 +8,6 @@ import (
"os"
"strings"
rice "github.com/GeertJohan/go.rice"
"github.com/dosco/super-graph/psql"
"github.com/dosco/super-graph/qcode"
"github.com/go-pg/pg"
@ -17,6 +16,8 @@ import (
"github.com/spf13/viper"
)
//go:generate esc -o static.go -private -pkg serv ../web/build
const (
authFailBlockAlways = iota + 1
authFailBlockPerQuery
@ -152,8 +153,7 @@ func InitAndListen() {
http.HandleFunc("/api/v1/graphql", withAuth(apiv1Http))
if conf.GetBool("web_ui") {
webUI := rice.MustFindBox("../web/build").HTTPBox()
http.Handle("/", http.FileServer(webUI))
http.Handle("/", http.FileServer(_escFS(false)))
}
hp := conf.GetString("host_port")