component/dis: Check if instance alive
This commit is contained in:
parent
37cdd201f0
commit
492a0c0404
8 changed files with 145 additions and 22 deletions
|
|
@ -14,7 +14,7 @@ import (
|
|||
_ "embed"
|
||||
)
|
||||
|
||||
// Template is a template for the cofiguration file
|
||||
// Template is a template for the configuration file
|
||||
type Template struct {
|
||||
DeployRoot string `env:"DEPLOY_ROOT"`
|
||||
DefaultDomain string `env:"DEFAULT_DOMAIN"`
|
||||
|
|
@ -24,6 +24,8 @@ type Template struct {
|
|||
TriplestoreAdminPassword string `env:"GRAPHDB_ADMIN_PASSWORD"`
|
||||
MysqlAdminUsername string `env:"MYSQL_ADMIN_USER"`
|
||||
MysqlAdminPassword string `env:"MYSQL_ADMIN_PASSWORD"`
|
||||
DisAdminUsername string `env:"DIS_ADMIN_USER"`
|
||||
DisAdminPassword string `env:"DIS_ADMIN_PASSWORD"`
|
||||
}
|
||||
|
||||
// SetDefaults sets defaults on the template
|
||||
|
|
@ -66,6 +68,17 @@ func (tpl *Template) SetDefaults() (err error) {
|
|||
}
|
||||
}
|
||||
|
||||
if tpl.DisAdminUsername == "" {
|
||||
tpl.DisAdminUsername = "admin"
|
||||
}
|
||||
|
||||
if tpl.DisAdminPassword == "" {
|
||||
tpl.DisAdminPassword, err = password.Password(64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue