Generating working default config in non-cd mode

Using the same approach as in cd mode, but do it only once when running
ctrld the first time, then the config will be re-used then.

While at it, also adding Dockerfile.debug for better troubleshooting
with alpine base image.
This commit is contained in:
Cuong Manh Le
2023-09-22 18:34:46 +07:00
committed by Cuong Manh Le
parent 82e44b01af
commit 13391fd469
6 changed files with 43 additions and 57 deletions
+1
View File
@@ -882,6 +882,7 @@ func readConfigFile(writeDefaultConfig bool) bool {
if err := v.Unmarshal(&cfg); err != nil {
mainLog.Load().Fatal().Msgf("failed to unmarshal default config: %v", err)
}
_ = updateListenerConfig()
if err := writeConfigFile(); err != nil {
mainLog.Load().Fatal().Msgf("failed to write default config file: %v", err)
} else {