Docker Implementation

This commit is contained in:
2024-01-22 01:49:13 +02:00
parent 10bb300087
commit 63c92ac272
6 changed files with 144 additions and 7 deletions

View File

@@ -17,6 +17,8 @@ type DHConfig struct {
IdentityUsername string `json:"identityUsername"`
IdentityPassword string `json:"identityPassword"`
IsDocker bool `json:isDocker`
DebugMode bool `json:"debugMode"`
}
@@ -36,6 +38,8 @@ func GetConfiguration() *DHConfig {
IdentityUsername: "admin",
IdentityPassword: "admin",
IsDocker: false,
Listen: ":8080",
}
@@ -79,5 +83,13 @@ func GetConfiguration() *DHConfig {
}
}
if val, exists := os.LookupEnv("IS_DOCKER"); exists {
if isDocker, err := strconv.ParseBool(val); err == nil {
config.IsDocker = isDocker
config.DatabaseFilePath = "/data/data.sqlite"
}
}
return config
}