initial jobs to bootstrap bastion with docker

This commit is contained in:
allanice001
2025-09-22 21:32:26 +01:00
parent 81e6c14625
commit c50fc1540a
11 changed files with 459 additions and 25 deletions

View File

@@ -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 {