mirror of https://github.com/statping/statping
vue
parent
b0ce98074e
commit
f4b11f0d17
4
Makefile
4
Makefile
|
@ -28,6 +28,10 @@ frontend-build:
|
|||
# build and push the images to docker hub
|
||||
docker: docker-build-all docker-publish-all
|
||||
|
||||
push-vue:
|
||||
docker build -t hunterlong/statping:vue .
|
||||
docker push hunterlong/statping:vue
|
||||
|
||||
# test all versions of Statping, golang testing and then cypress UI testing
|
||||
test-all: dev-deps test
|
||||
|
||||
|
|
|
@ -182,12 +182,14 @@ func ExportIndexHTML() []byte {
|
|||
}
|
||||
|
||||
func updateDisplay() error {
|
||||
var err error
|
||||
var gitCurrent githubResponse
|
||||
if gitCurrent, err = checkGithubUpdates(); err != nil {
|
||||
gitCurrent, err := checkGithubUpdates()
|
||||
if err != nil {
|
||||
fmt.Printf("Issue connecting to https://github.com/hunterlong/statping\n%v\n", err)
|
||||
return err
|
||||
}
|
||||
if gitCurrent.TagName == "" {
|
||||
return nil
|
||||
}
|
||||
if len(gitCurrent.TagName) < 2 {
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ func main() {
|
|||
log.Info(fmt.Sprintf("Starting Statping v%v", VERSION))
|
||||
updateDisplay()
|
||||
|
||||
_, err = core.LoadConfigFile(utils.Directory)
|
||||
config, err := core.LoadConfigFile(utils.Directory)
|
||||
if err != nil {
|
||||
log.Errorln(err)
|
||||
core.CoreApp.Setup = false
|
||||
|
@ -102,6 +102,9 @@ func main() {
|
|||
log.Fatalln(err)
|
||||
}
|
||||
}
|
||||
|
||||
core.CoreApp.Config = config.DbConfig
|
||||
|
||||
if err := mainProcess(); err != nil {
|
||||
log.Fatalln(err)
|
||||
os.Exit(2)
|
||||
|
|
|
@ -22,7 +22,6 @@ import (
|
|||
"github.com/hunterlong/statping/database"
|
||||
"github.com/hunterlong/statping/types"
|
||||
"github.com/hunterlong/statping/utils"
|
||||
"io/ioutil"
|
||||
)
|
||||
|
||||
// ErrorResponse is used for HTTP errors to show to User
|
||||
|
@ -41,12 +40,12 @@ func LoadConfigFile(directory string) (*DbConfig, error) {
|
|||
return LoadUsingEnv()
|
||||
}
|
||||
log.Debugln("Attempting to read config file at: " + directory + "/config.yml")
|
||||
file, err := ioutil.ReadFile(directory + "/config.yml")
|
||||
file, err := utils.OpenFile(directory + "/config.yml")
|
||||
if err != nil {
|
||||
CoreApp.Setup = false
|
||||
return nil, errors.New("config.yml file not found at " + directory + "/config.yml - starting in setup mode")
|
||||
}
|
||||
err = yaml.Unmarshal(file, &configs)
|
||||
err = yaml.Unmarshal([]byte(file), &configs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue