mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 21:00:06 +01:00
initial jobs to bootstrap bastion with docker
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
"github.com/joho/godotenv"
|
||||
"github.com/spf13/viper"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
var File = "config.yaml"
|
||||
@@ -35,6 +36,9 @@ func Load() {
|
||||
|
||||
viper.SetDefault("frontend.base_url", "http://localhost:5173")
|
||||
|
||||
viper.SetDefault("archer.instances", 2)
|
||||
viper.SetDefault("archer.timeoutSec", 60)
|
||||
|
||||
viper.SetEnvPrefix("AUTOGLUE")
|
||||
|
||||
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
|
||||
@@ -70,10 +74,14 @@ func GetAuthSecret() string {
|
||||
|
||||
func DebugPrintConfig() {
|
||||
all := viper.AllSettings()
|
||||
fmt.Println("Loaded configuration:")
|
||||
for k, v := range all {
|
||||
fmt.Printf("%s: %#v\n", k, v)
|
||||
|
||||
b, err := yaml.Marshal(all)
|
||||
if err != nil {
|
||||
fmt.Println("error marshalling config:", err)
|
||||
return
|
||||
}
|
||||
fmt.Println("Loaded configuration:")
|
||||
fmt.Println(string(b))
|
||||
}
|
||||
|
||||
func IsUIDev() bool {
|
||||
|
||||
Reference in New Issue
Block a user