mirror of
https://github.com/JustKato/drive-health.git
synced 2026-02-27 06:17:00 +02:00
Docker Implementation
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user